02.04.2011, 17:38
Try this :
Код:
if(strcmp(cmd, "/gotoxyz", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Usage: /gotoxyz [X] [Y] [Z]"); return 1; } new Float:para1; new Float:para2; new Float:para3; para1 = strval(tmp); tmp = strtok(cmdtext, idx); para2 = strval(tmp); tmp = strtok(cmdtext, idx); para3 = strval(tmp); if(PlayerInfo[playerid][pAdmin] >= 3) { if (GetPlayerState(playerid) == 2) { new tmpcar = GetPlayerVehicleID(playerid); SetVehiclePos(tmpcar, para1,para2,para3); TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0; } else SetPlayerPos(playerid, para1,para2,para3); SendClientMessage(playerid, COLOR_GREEN, "You have been teleported"); PlayerInfo[playerid][pInt] = 0; } else { SendClientMessage(playerid, COLOR_RED, "You don't have permission !"); } } return 1; }