COMMAND:setskin(playerid,params[])
{
if(PlayerAcc[playerid][AdminLevel] >= 2)
{
if(PlayerLogged[playerid] == 1)
{
new Target;
new Skinid;
if(!sscanf(params, "ui", Target, Skinid))
{
if(Target == INVALID_PLAYER_ID) return SendClientMessage(playerid,red,"ERROR: Wrong player ID");
if(Skinid > 299) return SendClientMessage(playerid,red,"ERROR: Skin IDґs from 0 to 299!");
new tname[MAX_PLAYER_NAME];
GetPlayerName(Target,tname,sizeof(tname));
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
new tstring[256];
new pstring[256];
format(tstring,sizeof(tstring),"Your skin is set to %d by %s",Skinid,pname);
format(pstring,sizeof(pstring),"You have set %s's(%d) skin to %d",tname,Target,Skinid);
SendClientMessage(Target,COLOR_BLUE,tstring);
SendClientMessage(playerid,COLOR_BLUE,pstring);
SetPlayerSkin(Target,Skinid);
}
else SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /setskin <playerid> <skinid>");
}
else SendClientMessage(playerid,red,"ERROR: You must be logged in to use this command!");
}
else SendClientMessage(playerid,red,"ERROR: You must be an Admin level 2 or higher to perform this command!");
return 1;
}
|
That could be a problem - are you sure the callback hooks are called? There's no reason why it would work in one script but not another. Frankly no-one else has mentioned anything about this in months since I changed the methods used.
|
xxx" called??|
He is asking if the callbacks are called..he means "are COMMAND
xxx" called??Once post your compile warnings..it sometimes happens when you forget to include zcmd but it compiles o.O Do you have a callback OnCommandPerformed in your working script??If you have show it(Somtimes returning wrong will tell ZCMD that the cmd was performed when actually not and which actually belonged to other script that but ZCMD would stop the command being forwarded to other scripts) |
|
I have the ZCMD include, but don't have OnPlayerCommandPerformed!
|