01.10.2010, 18:28
Can someone tell me what I need to do to get this code working normaly... -.-'
And if I in game enter /goto he will automatically send me to id 0... why?? and how to make if player enters only /goto (without id) he gets that message..??
'Cause when I enter /goto i dont get any message...he just teleports me... :S
pawn Код:
COMMAND:goto(playerid, params[])
{
new id = strval(params);
if(PlayerInfo[playerid][Admin] > 0 || PlayerInfo[playerid][Helper] > 0)
{
if(!params[0])return SendClientMessage(playerid, COLOR_WHITE, "[INFO]: /goto [id]");
{
new Float:x,Float:y,Float:z; GetPlayerPos(id,x,y,z);
SetPlayerPos(id,x+1,y+1,z);
}
}
else return SendClientMessage(playerid, COLOR_RED, "You must be Helper/Admin to use that command.");
return 1;
}
'Cause when I enter /goto i dont get any message...he just teleports me... :S