CMDS dont Work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMDS dont Work (
/showthread.php?tid=561761)
CMDS dont Work -
Saize - 04.02.2015
Hey guys, Iґve got a little problem with my new GM
I know it sounds dumb but my CMDґs just dont do anything фФ
Im using zcmd and theirs nothing wrong with the CMDґs but its just doing nothing its not even saying "SERVER: UNKNOWN COMMAND" so it seems like the Server knows the CMD but its not reacting
CMD for Example:
PHP код:
CMD:skin(playerid, params[])
{
new skin;
if(sscanf(params, "i", skin)) return SendClientMessage(playerid, 0xFFFFFFFF,"{FFFFFF}Usage: {B0000C}/skin [SkinID]");
if(pInfo[playerid][Adminlevel] >= 4 || IsPlayerAdmin(playerid))
{
if(skin > 299 || skin < 0) return SendClientMessage(playerid, 0xFFFFFFFF,"{FFFFFF}ERROR: {B0000C}Youґve got to choose a valid skin [0-299]");
pInfo[playerid][pSkin] = skin;
SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
SpawnPlayer(playerid);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"{FFFFFF}Error: {6C0808}Your Adminlevel is not high enough!");
}
return 1;
}
It works fine in my other gamemodes but here it just doesnt do anything
Re: CMDS dont Work -
Airman123 - 05.02.2015
Код:
SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
Replace this ^^ line with.
Код:
SetPlayerSkin(playerid, skin);
Also replace sscanf line with
if(sscanf(params,"d",skin))
Re: CMDS dont Work -
Furqan - 05.02.2015
Hmm, replace
Код:
SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
With this in my info.
Код:
SetPlayerSkin(playerid, skin);