06.05.2014, 19:18
pawn Код:
if(strcmp(cmd, "/gotols", true) == 0)
{
if(AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] < 1337)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pHelper] >= 2)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1529.6,-1691.2,13.3);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
}
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported !");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SendClientMessageToAll(playa, COLOR_LIGHTRED, string);
format(string, 128, "[ANTI-ABUSING] %s has using /gotols command !", sendername);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "* You must by duty. Type /aod");
return 1;
}
return 1;
}
- I tried to do something but I think that is do not good, right?