serverCmdDropTool(%client,%slot)
So this is the start?function DropItemProjectile::DropTool(%client,%slot){ %slot. { %client. }}
Code: [Select]So this is the start?function DropItemProjectile::DropTool(%client,%slot){ %slot. { %client. }}
Where the hell did you learn to code?
servercmdmyfunction(){%client = findclientbyname("yourname");serverCmdDropTool(%client,1);}
Code: [Select]servercmdmyfunction(){%client = findclientbyname("yourname");serverCmdDropTool(%client,1);}I think that'd make a function called myfunction that when you called it it'd make a person named yourname drop the item in his slot one.
function [whatever it is here]
function doStuff(arguments here)
function servercmddoStuff(arguments here)
This would syntax error at line 1 and do nothing. I don't mean to offend you but please don't post in coding help if you can't code.
function servercmdmyfunction()
Edit for clarification: You don't need to define %client as it is already defined, also line 4 should read "commandtoserver('droptool');" (is /droptool a command? I don't know lol)
function serverCmdDropStuff(%client){ serverCmdDropTool(%client); messageClient(%client, '', "\c6You dropped stuff!");}
Code: [Select]function serverCmdDropStuff(%client){ commandToServer(%client, "droptool"); messageClient(%client, '', "\c6You dropped stuff!");}
function serverCmdDropStuff(%client){ commandToServer(%client, "droptool"); messageClient(%client, '', "\c6You dropped stuff!");}
commandToServer is a client-sided function. The server-sided method for forcing a servercommand is like so:serverCmdCOMMAND(%client, %arg1, %arg2, %arg3...);
function DropItemProjectile::damage(%this,%obj,%col,%fade,%pos,%normal){ if(isObject(%col.client)) { serverCmdDropTool(%col.client); }}
function serverCmdDropAllTools(%client,%target){ %targetClient = findClientByName(%target); if(isObject(%targetClient.player)) { for(%i=0;%i<%targetClient.player.getDatablock().maxTools;%i++) { serverCmdDropTool(%targetClient,%i); } }}