08.04.2014, 04:46
pawn Код:
new tele_Enabled[MAX_PLAYERS]; // Global scope
public OnPlayerClickMap(playerod, FLoat:fX, Float:fY, Float:fZ)
{
if(tele_Enabled[playerid == 1 && PlayerInfo[playerid][pAdmin] >= 2)
{
SetPlayerPosFindZ(playerid, fX, fY, fZ);
}
else break;
return 1;
}
CMD:togglemaptp(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COL_GREY, "ERR: You cannot use this command!"):
if(tele_Enabled[playerid] == 0)
{
tele_Enabled[playerid] = 1;
SendClientMessage(playerid, COL_GREY, "SRV: You have enabled click-map teleportation!"):
}
else
{
tele_Enabled[playerid] = 0;
SendClientMessage(playerid, COL_GREY, "SRV: You have disabled click-map teleportation!");
}
return 1;
}
