/goto command issue
#6

PHP код:
CMD:goto(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 2)
    {
        if(
isnull(params))
        {
            
SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /goto [location]");
            
SendClientMessageEx(playeridCOLOR_GRAD1"Locations 1: LS,SF,LV");
            
SendClientMessageEx(playeridCOLOR_GRAD2"Locations 2: stadium1,stadium2,stadium3,stadium4,int1,mall");
            
SendClientMessageEx(playeridCOLOR_GRAD3"Locations 3: bank,allsaints,countygen,gym,fbi,prison,rc,vip,mark");
            return 
1;
        }
        if(
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        {
            
SendClientMessageEx(playeridCOLOR_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(tmpcar1529.6,-1691.2,13.3);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1529.6,-1691.2,13.3);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
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(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid, -1417.0,-295.8,14.1);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"lv",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1699.21435.110.7);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1699.2,1435.110.7);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"bank",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1487.91, -1030.6023.66);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1487.91, -1030.6023.66);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"allsaints",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1192.78, -1292.6813.38);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1192.78, -1292.6813.38);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"countygen",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar2000.05, -1409.3616.99);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid2000.05, -1409.3616.99);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"gym",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar2227.60, -1674.8914.62);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid2227.60, -1674.8914.62);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"fbi",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar344.77,-1526.08,33.28);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid344.77,-1526.08,33.28);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"rc",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1253.70343.7319.41);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1253.70343.7319.41);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"vip",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1814.42, -1575.0513.54);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1814.42, -1575.0513.54);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
        }
        else if(
strcmp(params,"prison",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar112.671917.5518.72);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid112.671917.5518.72);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
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.591059.86);
                
LinkVehicleToInterior(tmpcar4);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid, -1424.93, -664.591059.86);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,4);
            
PlayerInfo[playerid][pInt] = 4;
            
SetPlayerVirtualWorld(playerid0);
            
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.201051.28);
                
LinkVehicleToInterior(tmpcar7);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid, -1395.96, -208.201051.28);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,7);
            
PlayerInfo[playerid][pInt] = 7;
            
SetPlayerVirtualWorld(playerid0);
            
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.721591.161052.53);
                
LinkVehicleToInterior(tmpcar14);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid, -1410.721591.161052.53);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,14);
            
PlayerInfo[playerid][pInt] = 14;
            
SetPlayerVirtualWorld(playerid0);
            
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.20987.621023.96);
                
LinkVehicleToInterior(tmpcar15);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid, -1394.20987.621023.96);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,15);
            
PlayerInfo[playerid][pInt] = 15;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"int1",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1416.107000,0.268620,1000.926000);
                
LinkVehicleToInterior(tmpcar1);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1416.107000,0.268620,1000.926000);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,1);
            
PlayerInfo[playerid][pInt] = 1;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
        else if(
strcmp(params,"mark",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcarTeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
                
LinkVehicleToInterior(tmpcarTeleportDestInt[playerid]);
            }
            else
            {
                
SetPlayerPos(playeridTeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
            }
            
SetPlayerInterior(playerid,TeleportDestInt[playerid]);
            
PlayerInfo[playerid][pInt] = TeleportDestInt[playerid];
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
        }
        else if(
strcmp(params,"mark2",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcarTeleportDest2[playerid][0],TeleportDest2[playerid][1],TeleportDest2[playerid][2]);
                
LinkVehicleToInterior(tmpcarTeleportDestInt2[playerid]);
            }
            else
            {
                
SetPlayerPos(playeridTeleportDest2[playerid][0],TeleportDest2[playerid][1],TeleportDest2[playerid][2]);
            }
            
SetPlayerInterior(playerid,TeleportDestInt2[playerid]);
            
PlayerInfo[playerid][pInt] = TeleportDestInt2[playerid];
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
        }
        else if(
strcmp(params,"mall",true) == 0)
        {
            if (
GetPlayerState(playerid) == 2)
            {
                new 
tmpcar GetPlayerVehicleID(playerid);
                
SetVehiclePos(tmpcar1133.71,-1464.52,15.77);
                
LinkVehicleToInterior(tmpcar0);
                
SetVehicleVirtualWorld(tmpcar0);
                
TelePos[playerid][0] = 0.0;TelePos[playerid][0] = 0.0;
            }
            else
            {
                
SetPlayerPos(playerid1133.71,-1464.52,15.77);
            }
            
SendClientMessageEx(playeridCOLOR_GRAD1"   You have been teleported!");
            
SetPlayerInterior(playerid,0);
            
PlayerInfo[playerid][pInt] = 0;
            
SetPlayerVirtualWorld(playerid0);
            
PlayerInfo[playerid][pVW] = 0;
            
PlayerInfo[playerid][pLocal] = 255;
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command!");
    }
    return 
1;

Reply


Messages In This Thread
/goto command issue - by JamieVic - 12.10.2012, 06:44
AW: /goto command issue - by BiosMarcel - 12.10.2012, 06:46
Re: AW: /goto command issue - by JamieVic - 12.10.2012, 07:01
AW: /goto command issue - by BiosMarcel - 12.10.2012, 07:04
Re: AW: /goto command issue - by JamieVic - 12.10.2012, 07:10
AW: /goto command issue - by BiosMarcel - 12.10.2012, 07:14
Re: /goto command issue - by M3mPHi$_S3 - 12.10.2012, 07:21
Re: /goto command issue - by JamieVic - 12.10.2012, 07:26
AW: /goto command issue - by BiosMarcel - 12.10.2012, 07:33
Re: /goto command issue - by JamieVic - 12.10.2012, 07:34

Forum Jump:


Users browsing this thread: 2 Guest(s)