Cmds bugs! -
Sarra - 19.05.2012
when i updated the sv to 0.3e many commands didn't work like:
/setsking 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 )
+ the text doesn't appear anymore for all the commands (usually when you /anycommand exp /setskin it showes you how it works (/setskin playerID skinID) but not anymore! HELP PLEASE
Re: Cmds bugs! -
Jonny5 - 19.05.2012
without showing the code, how are we suppose to help?
Re : Cmds bugs! -
Sarra - 19.05.2012
i'll do it in PM!
Re: Cmds bugs! -
Jonny5 - 19.05.2012
okay i have answered your pm.
Re: Cmds bugs! -
Sarra - 19.05.2012
Код:
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;
}
i am sure that the code is okay :/ but i don't know what happened after the update to 0.3e /setskin playerid skin id became /setskin skinid so i can't set other player's skin anymore (only my skin) :/ help
Re: Cmds bugs! -
liquor - 19.05.2012
Change the "u" sscanf parameter to an "i".
Re: Cmds bugs! -
CmZxC - 19.05.2012
Have you updated the includes?
@liquor :
the 'u' parameter is for player name/id , the 'i' parameter is just an integer.
Quote:
Originally Posted by ******
Код:
Specifier(s) Name Example values
i, d Integer 1, 42, -10
c Character a, o, *
l Logical true, false
b Binary 01001, 0b1100
h, x Hex 1A, 0x23
o Octal 045 12
n Number 42, 0b010, 0xAC, 045
f Float 0.7, -99.5
g IEEE Float 0.7, -99.5, INFINITY, -INFINITY, NAN, NAN_E
u User name/id (bots and players) ******, 0
q Bot name/id ShopBot, 27
r Player name/id ******, 42
|
Re: Cmds bugs! -
liquor - 19.05.2012
Quote:
Originally Posted by CmZxC
Have you updated the includes?
@liquor :
the 'u' parameter is for player name/id , the 'i' parameter is just an integer.
|
I know, It could be what's causing It. Did you also know that a players ID is just an integer?
Therefore It will work, but you won't be able to type a players name, only their ID.
Or, try updating sscanf.
Re: Cmds bugs! -
Jonny5 - 19.05.2012
Quote:
Originally Posted by liquor
I know, It could be what's causing It. Did you also know that a players ID is just an integer?
Therefore It will work, but you won't be able to type a players name, only their ID.
Or, try updating sscanf.
|
yeah but that defeats the purpose
you can use the "r" instead of "u"
@sara, post what the console shows with the print statements.
Im sure youll find the flaw there somewhere.
Re: Cmds bugs! -
liquor - 19.05.2012
Quote:
Originally Posted by Jonny5
yeah but that defeats the purpose
you can use the "r" instead of "u"
@sara, post what the console shows with the print statements.
Im sure youll find the flaw there somewhere.
|
Well, seeing how it doesn't work properly It already defeats itself.
Believe me, I've had the same problem and I tried 'r' and It did not solve any problem.