31.07.2015, 19:27
Quote:
It should work now.
Код:
CMD:goto(playerid,params[]) { new id,str[128],name[MAX_PLAYER_NAME]; if(sscanf(params,"u",id)) { SendClientMessage(playerid,-1,"{CACA00}[INFO]{FFFFFF}: /goto (Player Name/ID)"); return 1; } if(!IsConnect(id)) { SendClientMessage(playerid,-1,"Player{FF0000} not{FFFFFF} found"); return 1; } if(IsPlayerInDMgoto[playerid] != 0) { SendClientMessage(playerid, -1, "{FFFFFF}You{FF0000} can't{FFFFFF} goto this player while on DM!"); return 1; } if(P_DATA[id][Agoto] == false) { SendClientMessage(playerid,-1,"{FFFFFF}You{FF0000} can't{FFFFFF} goto to this player because he disabled it."); return 1; } new Float:Pos[4]; GetPlayerPos(id,Pos[0],Pos[1],Pos[2]); GetPlayerFacingAngle(id,Pos[3]); if(IsPlayerInAnyVehicle(playerid)){ SetVehiclePos(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]); } else{ SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); SetPlayerFacingAngle(playerid,Pos[3]); } GetPlayerName(id,name,sizeof(name)); format(str,sizeof(str),"You have teleported to '{FFFF00}%s{FFFFFF}'.",name); SendClientMessage(playerid,-1,str); return 1; } |