SA-MP Forums Archive
error (invalid function or declaration)...help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error (invalid function or declaration)...help (/showthread.php?tid=538395)



error (invalid function or declaration)...help - Ryz - 21.09.2014

I am trying to add protoype system on my server but i am getting errors


pawn Код:
C:\Users\Ryz\Desktop\codww2.pwn(16710) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16712) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16714) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16720) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16726) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16729) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16735) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16738) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16744) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16747) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16753) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16756) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16762) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16765) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16771) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16774) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16780) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16783) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16789) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16792) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16798) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16801) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16807) : error 010: invalid function or declaration
C:\Users\Ryz\Desktop\codww2.pwn(16810) : error 010: invalid function or declaration

pawn Код:
new afpro, pakpro, inpro, gerpro, chpro, brpro, frpro, ntpro, auspro, uspro, ukpro, rupro;

    afpro = AddStaticVehicleEx(609,833.8020,-1208.9556,17.0464,268.3823,152,161, 20);
    auspro = AddStaticVehicleEx(609,-2038.4958,-2381.9534,30.6922,133.8758,186,172, 20);
    uspro = AddStaticVehicleEx(609,1075.7566,1244.6595,10.8929,359.7996,175,158, 20);
    gerpro = AddStaticVehicleEx(609,-1703.6576,15.3127,3.6226,315.2565,128,185, 20);
    pakpro = AddStaticVehicleEx(609,276.3608,1954.5251,17.7083,272.3873,219,194,20);
    inpro = AddStaticVehicleEx(609,833.8020,-1208.9556,17.0464,268.3823,152,161, 20);
    brpro = AddStaticVehicleEx(609,-2038.4958,-2381.9534,30.6922,133.8758,186,172, 20);
    frpro = AddStaticVehicleEx(609,1075.7566,1244.6595,10.8929,359.7996,175,158, 20);
    ntpro = AddStaticVehicleEx(609,-1703.6576,15.3127,3.6226,315.2565,128,185, 20);
    chpro = AddStaticVehicleEx(609,276.3608,1954.5251,17.7083,272.3873,219,194,20);
    ukpro = AddStaticVehicleEx(609,-1703.6576,15.3127,3.6226,315.2565,128,185, 20);
    rupro = AddStaticVehicleEx(609,276.3608,1954.5251,17.7083,272.3873,219,194,20);
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(IsPlayerInVehicle(playerid, afpro)) //this is error line
        {
            switch(GetPlayerTeam(playerid)) //this is error line
            {
                case TEAM_AFGHANISTAN:
                {
                    SetPlayerPos(playerid,x,y,z+2.0);
                    SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
                    RemovePlayerFromVehicle(playerid);
                }
                case TEAM_GERMANY:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_PAKISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_CHINA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_FRANCE:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_NETHERLANDS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_AUS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_INDIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_RUSSIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_USA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_BRAZIL:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_UK:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                }
            }
        }
Please help


Re: error (invalid function or declaration)...help - Blt950 - 21.09.2014

Have you declared TEAM_GERMANY etc?

Could you point out where in the script line 16710, 16712 and 16714 is?
As I don't know where to look for the error.


Re: error (invalid function or declaration)...help - Ryz - 21.09.2014

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(IsPlayerInVehicle(playerid, afpro))
        {
            switch(GetPlayerTeam(playerid))
            {
                case TEAM_AFGHANISTAN:
                {
                    SetPlayerPos(playerid,x,y,z+2.0);
                    SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
                    RemovePlayerFromVehicle(playerid);
                }
                case TEAM_GERMANY:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_PAKISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_CHINA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_FRANCE:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_NETHERLANDS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_AUS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_INDIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_RUSSIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_USA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_BRAZIL:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_UK:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                }
            }return 1;
        }
        //GERMANY
        else if(IsPlayerInVehicle(playerid, gerpro))
        {
            switch(GetPlayerTeam(playerid))
            {
                case TEAM_GERMANY:
                {
                    SetPlayerPos(playerid,x,y,z+2.0);
                    SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
                    RemovePlayerFromVehicle(playerid);
                }
                case TEAM_AFGHANISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_PAKISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_CHINA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_FRANCE:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_NETHERLANDS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_AUS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_INDIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_RUSSIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_USA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_BRAZIL:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_UK:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                }
            }
        }
        //PAKISTAN
        else if(IsPlayerInVehicle(playerid, pakpro)) // ERROR LINE 16710
        {
            switch(GetPlayerTeam(playerid)) // ERROR LINE 16712
            {
                case TEAM_PAKISTAN: // ERROR LINE 16714
                {
                    SetPlayerPos(playerid,x,y,z+2.0);
                    SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
                    RemovePlayerFromVehicle(playerid);
                }
                case TEAM_AFGHANISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_GERMANY:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_CHINA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_FRANCE:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_NETHERLANDS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_AUS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_INDIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_RUSSIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_USA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_BRAZIL:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_UK:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                }
            }
        }



Re: error (invalid function or declaration)...help - Blt950 - 21.09.2014

If the code is pasted complete, your issue would most probably be that you're missing a curled bracket } at the end of OnPlayerStateChange.


Re: error (invalid function or declaration)...help - bensmart469 - 21.09.2014

One extra bracket found:
pawn Код:
else if(IsPlayerInVehicle(playerid, gerpro))
        {
            switch(GetPlayerTeam(playerid))
            {
                case TEAM_GERMANY:
                {
                    SetPlayerPos(playerid,x,y,z+2.0);
                    SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
                    RemovePlayerFromVehicle(playerid);
                }
                case TEAM_AFGHANISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_PAKISTAN:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_CHINA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_FRANCE:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_NETHERLANDS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_AUS:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_INDIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_RUSSIA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_USA:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_BRAZIL:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                case TEAM_UK:
                {
                    TogglePlayerAllDynamicCPs(playerid, 0);
                    SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
                    GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
                    IsPrototyping{playerid } = true;
                    foreach (new i : Player)    if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
                }
                }
            }
        }
In that code section, bottom of it


Re: error (invalid function or declaration)...help - Ryz - 21.09.2014

NO NO NO LOOK

Код:
//==============================================================================
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
	if(newstate == PLAYER_STATE_DRIVER)
	{
		if(IsPlayerInVehicle(playerid, afpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_AFGHANISTAN:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AFGHANISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//GERMANY
		else if(IsPlayerInVehicle(playerid, gerpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_GERMANY:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_GERMANY)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//PAKISTAN
		else if(IsPlayerInVehicle(playerid, pakpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_PAKISTAN:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_PAKISTAN)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//CHINA
		else if(IsPlayerInVehicle(playerid, chpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_CHINA:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_CHINA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
        //FRANCE
		else if(IsPlayerInVehicle(playerid, frpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_FRANCE:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_FRANCE)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
        //NETHERLANDS
		else if(IsPlayerInVehicle(playerid, ntpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_NETHERLANDS:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_NETHERLANDS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
        //INDIA
		else if(IsPlayerInVehicle(playerid, inpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_INDIA:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_INDIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
        //RUSSIA
		else if(IsPlayerInVehicle(playerid, rupro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_RUSSIA:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_RUSSIA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
        //USA
		else if(IsPlayerInVehicle(playerid, uspro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_USA:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_USA)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//BRAZIL
		else if(IsPlayerInVehicle(playerid, brpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_BRAZIL:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_BRAZIL)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//UK
		else if(IsPlayerInVehicle(playerid, brpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_UK:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_AUS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_UK)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		//AUSTRALIA
		else if(IsPlayerInVehicle(playerid, brpro))
		{
		    switch(GetPlayerTeam(playerid))
		    {
				case TEAM_AUS:
			    {
					SetPlayerPos(playerid,x,y,z+2.0);
					SendClientMessage(playerid, COLOR_RED, "[ERROR]: You can't capture your team prototype.");
					RemovePlayerFromVehicle(playerid);
				}
			    case TEAM_AFGHANISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, -2241.5439,2463.1736,4.9844, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
				    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_GERMANY:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_PAKISTAN:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_CHINA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_FRANCE:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_UK:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_NETHERLANDS:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_INDIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_RUSSIA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_USA:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				case TEAM_BRAZIL:
			    {
			        TogglePlayerAllDynamicCPs(playerid, 0);
			        SetPlayerCheckpoint(playerid, 848.2058,-1193.2412,16.9766, 6.00);
		            GameTextForPlayer(playerid, "~g~Get The Proto To your Base", 3000, 6);
		            IsPrototyping{playerid } = true;
		            foreach (new i : Player)	if(GetPlayerTeam(i) == TEAM_AUS)
                    SendClientMessage(i, COLOR_YELLOW, "[WARNING]: Your team prototype is being stolen.");
				}
				}
			}
		}
		}
	}
	return 1;
}



Re: error (invalid function or declaration)...help - bensmart469 - 21.09.2014

Yeah you've added an extra one...i can see it clearly in both code snippets...


Re: error (invalid function or declaration)...help - Blt950 - 21.09.2014

Be sure to post the whole code for starters, so it's easier for us to find the error.
Your error is probably too many curled brackets at the end.

Try this and tell me if it works.
http://pastebin.com/tmMGNCKH


Re: error (invalid function or declaration)...help - bensmart469 - 21.09.2014

I checked it with a missing bracket finder, this was the result:


And to the person above me...your code returned 313 closing brackets.



Re: error (invalid function or declaration)...help - Blt950 - 21.09.2014

Indeed. Found them now I believe.

Try this one instead: http://pastebin.com/0GX8xx2T