02.11.2011, 20:04
Im a level 1339 Admin on my server, and using this goto command
Its a level one admin required to use the command yet im 1339 and it still tells me im unauthorized. What could be wrong?
pawn Код:
CMD:goto(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
if(isnull(params))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /goto [location]");
SendClientMessage(playerid, COLOR_GREY, "Locations 1: LS,SF,LV");
SendClientMessage(playerid, COLOR_GREY, "Locations 2: stadium1,stadium2,stadium3,stadium4,int1,mall");
SendClientMessage(playerid, COLOR_GREY, "Locations 3: bank,allsaints,countygen,gym,fbi,prison,rc,vip,mark");
SendClientMessage(playerid, COLOR_GREY, "Locations 4: [NEW]jungle,jungle1");
return 1;
}
if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
{
SendClientMessage(playerid, COLOR_GRAD2, "You can not do this while spectating.");
return 1;
}
if(strcmp(params,"ls",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1485.9170,-1730.4979,13.0973);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1485.9170,-1730.4979,13.0973);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"sf",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1417.0,-295.8,14.1);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1417.0,-295.8,14.1);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"jungle",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -2051.46289062,-194.11035156,34.32739258);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -2051.46289062,-194.11035156,34.32739258);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"lv",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1699.2, 1435.1, 10.7);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1699.2,1435.1, 10.7);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"bank",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1487.91, -1030.60, 23.66);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1487.91, -1030.60, 23.66);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"allsaints",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1192.78, -1292.68, 13.38);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1192.78, -1292.68, 13.38);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"countygen",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2000.05, -1409.36, 16.99);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2000.05, -1409.36, 16.99);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"gym",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2227.60, -1674.89, 14.62);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 2227.60, -1674.89, 14.62);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"fbi",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 344.77,-1526.08,33.28);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 344.77,-1526.08,33.28);
}
SendClientMessage(playerid, COLOR_GREY, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"rc",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1253.70, 343.73, 19.41);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1253.70, 343.73, 19.41);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"vip",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1814.42, -1575.05, 13.54);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1814.42, -1575.05, 13.54);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
}
else if(strcmp(params,"prison",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 112.67, 1917.55, 18.72);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 112.67, 1917.55, 18.72);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"stadium1",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1424.93, -664.59, 1059.86);
LinkVehicleToInterior(tmpcar, 4);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1424.93, -664.59, 1059.86);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,4);
PlayerInfo[playerid][pInt] = 4;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"stadium2",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1395.96, -208.20, 1051.28);
LinkVehicleToInterior(tmpcar, 7);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1395.96, -208.20, 1051.28);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,7);
PlayerInfo[playerid][pInt] = 7;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"stadium3",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1410.72, 1591.16, 1052.53);
LinkVehicleToInterior(tmpcar, 14);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1410.72, 1591.16, 1052.53);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,14);
PlayerInfo[playerid][pInt] = 14;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"stadium4",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, -1394.20, 987.62, 1023.96);
LinkVehicleToInterior(tmpcar, 15);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, -1394.20, 987.62, 1023.96);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,15);
PlayerInfo[playerid][pInt] = 15;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"int1",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1416.107000,0.268620,1000.926000);
LinkVehicleToInterior(tmpcar, 1);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1416.107000,0.268620,1000.926000);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,1);
PlayerInfo[playerid][pInt] = 1;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
else if(strcmp(params,"mark",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
LinkVehicleToInterior(tmpcar, TeleportDestInt[playerid]);
}
else
{
SetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
}
SetPlayerInterior(playerid,TeleportDestInt[playerid]);
PlayerInfo[playerid][pInt] = TeleportDestInt[playerid];
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
}
else if(strcmp(params,"mall",true) == 0)
{
if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1133.71,-1464.52,15.77);
LinkVehicleToInterior(tmpcar, 0);
SetVehicleVirtualWorld(tmpcar, 0);
TelePos[playerid][0] = 0.0;TelePos[playerid][0] = 0.0;
}
else
{
SetPlayerPos(playerid, 1133.71,-1464.52,15.77);
}
SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported!");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pLocal] = 255;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}