23.06.2016, 15:02
Quote:
pawn Код:
It's not to the nearest player, but to a player of choice. A bit of research can get the closest player ID. |
Quote:
if(strcmp("/dig",cmdtext,true,10)==0) { if(gTeam[playerid] == TEAM_ZOMBIE) if(gettime() < lastTPTime[playerid])return SendClientMessage(playerid, -1, "You can't dig right now."); new id, Float, Float:y, Float:z; if(sscanf(cmdtext, "u", id))return SendClientMessage(playerid, -1, "Usage: /dig [playerid/name] - This will dig you to a human."); { if(!IsPlayerConnected(id))return SendClientMessage(playerid, -1, "That player isn't connected."); if(gTeam[playerid] == TEAM_HUMAN) SendClientMessage(playerid, -1, "That player isn't a Human."); GetPlayerPos(id, x, y, z); SetPlayerPos(playerid, x, y-2.0, z); SendClientMessage(playerid, -1, "You have teleported to a human!"); lastTPTime[playerid] = (gettime() + 180); } return 1; } |