06.05.2014, 17:22
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);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported !");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
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 did well above? If is a admin > 1337 he must type the command /aod to use the /gotols?