Get All Player Weapons!
#1

How can i get all player weapons. Mean after death they will have no weapons?? Plz tell....

Edit:
How can be sniper class can be remove from map??
Reply
#2

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
       ResetPlayerWeapons(playerid);
    return 1;
}
Reply
#3

pawn Код:
new Died[MAX_PLAYERS];//This goes on top..

//--------------------------------------------------------------------\\
public OnPlayerConnect(playerid)
{
    Died[playerid] = 0;
    return 1;
}

//--------------------------------------------------------------------\\
public OnPlayerDeath(playerid, killerid, reason)
{
    Died[playerid] = 1;
    return 1;
}

//--------------------------------------------------------------------\\
public OnPlayerSpawn(playerid)
{
    if(Died[playerid]==1) ResetPlayerWeapons(playerid);
    return 1;
}
To Hide Snipers

pawn Код:
for(new i =0;i<MAX_PLAYERS;++i)
{
if(IsPlayerConnected(i))
    {
    //Here search for sniper and then hide them
    SetPlayerMarkerForPlayer(playerid,i,(SNIPER_COLOR & 0xFFFFFF00));//Change Sniper color as you want
    }
}
Reply
#4

@Roxxor Bro:
I did this:

pawn Код:
if(dialogid == 999)
            {
                if(response)
                    {
                if(listitem == 0)
                    {
                    if(GetPlayerScore(playerid) >= 0)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Assault as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assult Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}M4\n{FFFFFF}Spaz12\n{FFFFFF}Deagle", "OK","");
                        gPlayerClass[playerid] = ASSAULT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 27, 400);
                        GivePlayerWeapon(playerid, 24, 300);
                        GivePlayerWeapon(playerid, 31, 700);
                        }
                    }

                if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 150)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Sniper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                        gPlayerClass[playerid] = SNIPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 34, 400);
                        GivePlayerWeapon(playerid, 25, 200);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_RED,"You need to be on Rank 2 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 2)
                    {
                    if(GetPlayerScore(playerid) >= 400)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Engineer as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class. Very good on land\nCan drive tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Desert Eagle", "OK","");
                        gPlayerClass[playerid] = ENGINEER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 27, 400);
                        GivePlayerWeapon(playerid, 23, 400);
                        GivePlayerWeapon(playerid, 35, 2);
                        GivePlayerWeapon(playerid, 24, 300);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 3 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 3)
                    {
                    if(GetPlayerScore(playerid) >= 800)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Jet-Trooper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jetrooper Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can spawn jetpack by /jp.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                        gPlayerClass[playerid] = JETTROOPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 32, 2000);
                        GivePlayerWeapon(playerid, 22, 700);
                        GivePlayerWeapon(playerid, 18, 2);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 5 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 4)
                    {
                    if(GetPlayerScore(playerid) >= 1500)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Pilot as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                        gPlayerClass[playerid] = PILOT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 22, 300);
                        GivePlayerWeapon(playerid, 24, 400);
                        GivePlayerWeapon(playerid, 17, 4);
                        GivePlayerWeapon(playerid, 25, 200);
                        }
                        else
            {
                SendClientMessage(playerid,COLOR_DARKRED,"You need to be on Rank 7 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }


                return 1;
        }
                return 1;
    }
pawn Код:
if( gPlayerFirstSpwn{playerid} )
    {
        gPlayerFirstSpwn{playerid} = false;
        ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 3)  \nJet-Trooper Class  (Need Rank 5)  \nPilot Class  (Need Rank 7) ", "Choose","");
        TogglePlayerControllable(playerid, 0);
    }
    else
    {
        switch(gPlayerClass[playerid])
        {
       
            case ASSAULT:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 24, 300);
                GivePlayerWeapon(playerid, 31, 1000);
            }
            case SNIPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 34, 400);
                GivePlayerWeapon(playerid, 25, 200);
            }
            case ENGINEER:
            {
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 23, 400);
                GivePlayerWeapon(playerid, 35, 2);
                GivePlayerWeapon(playerid, 24, 300);
            }
            case JETTROOPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 32, 2000);
                GivePlayerWeapon(playerid, 22, 700);
                GivePlayerWeapon(playerid, 18, 2);
            }
            case PILOT:
            {
                GivePlayerWeapon(playerid, 22, 300);
                GivePlayerWeapon(playerid, 24, 400);
                GivePlayerWeapon(playerid, 17, 4);
                GivePlayerWeapon(playerid, 25, 200);

            }
        }
    }
SetPlayerVirtualWorld(playerid, 0);
But when player get spawn after kill or sucide his ammo become double some time. And some time his get sniper or other classes weapons....
Reply
#5

Hmm.. try this

pawn Код:
new gPlayerFirstSpwn[MAX_PLAYERS];
pawn Код:
public OnPlayerConnect(playerid)
{
    gPlayerFirstSpawn[playerid] = 0;
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gPlayerFirstSpawn[playerid]==0)
    {
    gPlayerFirstSpwn[playerid] = 1;
    ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 3)  \nJet-Trooper Class  (Need Rank 5)  \nPilot Class  (Need Rank 7) ", "Choose","");
    TogglePlayerControllable(playerid, 0);
    }
    else
    {
      ResetPlayerWeapons(playerid);
        switch(gPlayerClass[playerid])
        {

            case ASSAULT:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 24, 300);
                GivePlayerWeapon(playerid, 31, 1000);
            }
            case SNIPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 34, 400);
                GivePlayerWeapon(playerid, 25, 200);
            }
            case ENGINEER:
            {
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 23, 400);
                GivePlayerWeapon(playerid, 35, 2);
                GivePlayerWeapon(playerid, 24, 300);
            }
            case JETTROOPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 32, 2000);
                GivePlayerWeapon(playerid, 22, 700);
                GivePlayerWeapon(playerid, 18, 2);
            }
            case PILOT:
            {
                GivePlayerWeapon(playerid, 22, 300);
                GivePlayerWeapon(playerid, 24, 400);
                GivePlayerWeapon(playerid, 17, 4);
                GivePlayerWeapon(playerid, 25, 200);

            }
        }
    }
    SetPlayerVirtualWorld(playerid, 0);
   
    return 1;
}
Reply
#6

EDIT:
Still Same. It got sniper on its first spawn and many other classes guns.... It only happens on first spawn

I know maybe it will problem. On player spawn it will show you dialogue. So you need to select class and it will give u weapons. But it is also your first spawn. If we change first spawn to second spawn?? So how can we change it??
Reply
#7

Well you can change first spawn to second like this
pawn Код:
new tSpawned[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    tSpawned[playerid] = 0;
    return 1;
}
public OnPlayerSpawn(playerid)
{
    ++tSpawned[playerid];
    if(tSpawned[playerid] == 2)
    {
    //Second Spawn
    }
}
I tested earlier code and it worked fine. You can compile this and check yourself.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#define COLOR_WHITE 0xFFFFFF
#define ASSAULT 1
#define SNIPER 2
#define ENGINEER 3
#define JETTROOPER 4
#define PILOT 5
new gPlayerClass[MAX_PLAYERS];
new PickedClass[MAX_PLAYERS];
new gPlayerFirstSpawn[MAX_PLAYERS];

#if defined FILTERSCRIPT

#pragma tabsize 0
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{
    gPlayerFirstSpawn[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(gPlayerFirstSpawn[playerid]==0)
    {
    gPlayerFirstSpawn[playerid] = 1;
    ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 3)  \nJet-Trooper Class  (Need Rank 5)  \nPilot Class  (Need Rank 7) ", "Choose","");
    TogglePlayerControllable(playerid, 0);
    }
    else
    {
      ResetPlayerWeapons(playerid);
      switch(gPlayerClass[playerid])
      {

            case ASSAULT:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 24, 300);
                GivePlayerWeapon(playerid, 31, 1000);
            }
            case SNIPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 34, 400);
                GivePlayerWeapon(playerid, 25, 200);
            }
            case ENGINEER:
            {
                GivePlayerWeapon(playerid, 27, 400);
                GivePlayerWeapon(playerid, 23, 400);
                GivePlayerWeapon(playerid, 35, 2);
                GivePlayerWeapon(playerid, 24, 300);
            }
            case JETTROOPER:
            {
                GivePlayerWeapon(playerid, 4, 1);
                GivePlayerWeapon(playerid, 32, 2000);
                GivePlayerWeapon(playerid, 22, 700);
                GivePlayerWeapon(playerid, 18, 2);
            }
            case PILOT:
            {
                GivePlayerWeapon(playerid, 22, 300);
                GivePlayerWeapon(playerid, 24, 400);
                GivePlayerWeapon(playerid, 17, 4);
                GivePlayerWeapon(playerid, 25, 200);

            }
        }
    }
    SetPlayerVirtualWorld(playerid, 0);

    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid,0);
        return 1;
    }
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 999)
            {
                if(response)
                    {
                if(listitem == 0)
                    {
                    if(GetPlayerScore(playerid) >= 0)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Assault as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Assult Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, good in infantry attacks.\n\n{F81414}Weapons:\n\n{FFFFFF}Knife\n{FFFFFF}M4\n{FFFFFF}Spaz12\n{FFFFFF}Deagle", "OK","");
                        gPlayerClass[playerid] = ASSAULT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 27, 400);
                        GivePlayerWeapon(playerid, 24, 300);
                        GivePlayerWeapon(playerid, 31, 700);
                        }
                    }

                if(listitem == 1)
                    {
                    if(GetPlayerScore(playerid) >= 150)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Sniper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Sniper Class:", "{F81414}Abilities:\n{FFFFFF}A Locater class, Always invisible on map.\n\n{F81414}Weapons:\n\n{FFFFFF}Sniper Rifle\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}Shotgun", "OK","");
                        gPlayerClass[playerid] = SNIPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 34, 400);
                        GivePlayerWeapon(playerid, 25, 200);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_WHITE,"You need to be on Rank 2 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 2)
                    {
                    if(GetPlayerScore(playerid) >= 400)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Engineer as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Engineer Class:", "{F81414}Abilities:\n{FFFFFF}A Strong class. Very good on land\nCan drive tanks.\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}RPG\n{FFFFFF}Desert Eagle", "OK","");
                        gPlayerClass[playerid] = ENGINEER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 27, 400);
                        GivePlayerWeapon(playerid, 23, 400);
                        GivePlayerWeapon(playerid, 35, 2);
                        GivePlayerWeapon(playerid, 24, 300);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_WHITE,"You need to be on Rank 3 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 3)
                    {
                    if(GetPlayerScore(playerid) >= 800)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Jet-Trooper as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Jetrooper Class:", "{F81414}Abilities:\n{FFFFFF}A Solo class, can spawn jetpack by /jp.\n\n{F81414}Weapons:\n\n{FFFFFF}Tec-9\n{FFFFFF}Colt\n{FFFFFF}Knife\n{FFFFFF}Moltov", "OK","");
                        gPlayerClass[playerid] = JETTROOPER;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 4, 1);
                        GivePlayerWeapon(playerid, 32, 2000);
                        GivePlayerWeapon(playerid, 22, 700);
                        GivePlayerWeapon(playerid, 18, 2);
                        }
                    else
            {
                SendClientMessage(playerid,COLOR_WHITE,"You need to be on Rank 5 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }

                if(listitem == 4)
                    {
                    if(GetPlayerScore(playerid) >= 1500)
                        {
                        SendClientMessage(playerid, COLOR_WHITE, "Server News: You Chose the Pilot as your class.");
                        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Pilot Class:", "{F81414}Abilities:\n{FFFFFF}A Airforce class, Very Good in Air. Can drive Hunter, Hydra & Sea Sparrow.\n\n{F81414}Weapons:\n\n{FFFFFF}Deagle\n{FFFFFF}Tear Gas\n{FFFFFF}Shotgun\n{FFFFFF}9mm", "OK","");
                        gPlayerClass[playerid] = PILOT;
                        PickedClass[playerid] = 1;
                        SetPlayerVirtualWorld(playerid, 0);
                        TogglePlayerControllable(playerid, 1);
                        GivePlayerWeapon(playerid, 22, 300);
                        GivePlayerWeapon(playerid, 24, 400);
                        GivePlayerWeapon(playerid, 17, 4);
                        GivePlayerWeapon(playerid, 25, 200);
                        }
                        else
            {
                SendClientMessage(playerid,COLOR_WHITE,"You need to be on Rank 7 to get this Class.");

                ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Assault Class  (Need No Rank)  \nSniper Class  (Need Rank 2)  \nEngineer Class  (Need Rank 5)  \nJet-Trooper Class  (Need Rank 7)  \nPilot Class  (Need Rank 8)", "Choose","");
                TogglePlayerControllable(playerid, 0);
                }
            }


                return 1;
        }
                return 1;
    }
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#8

Its Okay. thanks For Help. yeah its working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)