cmds problem! - 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 problem! (
/showthread.php?tid=359078)
cmds problem! -
Sarra - 12.07.2012
when i updated the sv to 0.3e many commands didn't work like:
/enter (i can't /enter to any interior)
/setskin PlayerID SkinID now it doesn't work (i can /setskin for myself! when i type /setskin SKINID i get it but what happened ? i can't set other players skin anymore)
/goto Place (now it doesn't work exp: /goto LS it doesn't teleport you = it teleports you yes but to your place not to the wanted place it means when i /goto place the player moves but in his place = it get teleported but in the same place where he is staying)
/enter (do you believe it? i can't /enter )
i believe that the sscanf is the problem!
exp /setskin code
pawn Код:
CMD:setskin(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
new string[128], giveplayerid, skinid;
if(sscanf(params, "ud", giveplayerid, skinid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /setskin [playerid] [skinid]");
if(IsPlayerConnected(giveplayerid))
{
if(!IsInvalidSkin(skinid))
{
if(GetPlayerSkin(giveplayerid) == skinid)
{
SendClientMessageEx( playerid, COLOR_WHITE, "The player you're trying to change skins of already is using the skin you're trying to set." );
}
else
{
PlayerInfo[giveplayerid][pChar] = skinid;
PlayerInfo[giveplayerid][pModel] = skinid;
format(string, sizeof(string), "Your skin has been changed to ID %d by Administrator %s.", skinid, GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "You have given %s skin ID %d.", GetPlayerNameEx(giveplayerid), skinid);
SendClientMessageEx(playerid, COLOR_WHITE, string);
SetPlayerSkin(giveplayerid, PlayerInfo[giveplayerid][pChar]);
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid skin ID!");
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}
Re: cmds problem! -
clarencecuzz - 12.07.2012
Try updating your sscanf include to 0.3e as well.
https://sampforum.blast.hk/showthread.php?tid=120356
Note: You may have to change #include <sscanf> to #include <sscanf2>
Re : cmds problem! -
Sarra - 13.07.2012
i am using the last update of sscanf!
Re: cmds problem! -
Oscii - 13.07.2012
Are you using any other CMD processor?
like are ALL commands ZCMD?
Re : cmds problem! -
Sarra - 13.07.2012
YES...
Re: cmds problem! -
Oscii - 13.07.2012
Try to make all the commands the same processor.. or it will Remove all the other commands -.-
I had this problem.
Re: cmds problem! -
Tuntun - 13.07.2012
try #include <a_samp> in top...
Re: cmds problem! -
Steven82 - 13.07.2012
Are you sure you have the new sscanf..because your /setskin is using sscanf, and if you don't have the 0.3e version it won't work properly.
Re : Re: cmds problem! -
Sarra - 21.07.2012
Yes I am SURE!
Re: cmds problem! -
newbienoob - 21.07.2012
Get nativechecker or crashdetect plugin. See if there's something wrong in your gm.