Why isn't this working?
#1

Please help
Код:
	if (strcmp(cmdtext, "/gotoxyz", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			new Float:X, Float:Y, Float:Z;
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
				return 1;
			}
			X = strval(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
			    return 1;
			}
			Y = strval(tmp);
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
			    SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [x] [y] [z]");
			    return 1;
			}
			Z = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
				SendClientMessage(playerid, COLOR_GREEN, " ** You've teleported to desired X, Y, Z !");
				SetPlayerPos(playerid, X, Y, Z);
        	}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   you are not authorized to use that command!");
			}
		}
		return 1;
	}
it's not working dunno why?
Reply
#2

pawn Код:
if(sscanf(params, "fff", player, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, color, "USAGE: /gotoxyz [x] [y] [z]");
i make something but idk not tested try to make something with this line :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)