08.04.2014, 02:40
When I enable map teleporting, it doesn't teleport where I click on the map.
Код:
new TeleEnabled[MAX_PLAYERS]; public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) { if(TeleEnabled[playerid] == 1 && PlayerInfo [playerid][pAdmin] >= 2) { SetPlayerPosFindZ(playerid, fX, fY, fZ); } } CMD:maptp(playerid,params[]) { if(TeleEnabled[playerid] == 0) { TeleEnabled[playerid] = 1; SendClientMessage(playerid,WHITE,"You have enabled map teleporting!"); return 0; } if(TeleEnabled[playerid] == 1) { TeleEnabled[playerid] = 0; SendClientMessage(playerid,WHITE,"You have disabled map teleporting!"); return 0; } return 1; }