SA-MP Forums Archive
Classes [NEED 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Classes [NEED HELP] (/showthread.php?tid=169709)



Classes [NEED HELP] - matthewdriftking - 20.08.2010

Hey guys,

How can i make if they spawn with the class id 2 they GiveWeapon();

I have this code but i dont know how to do it on OnPlayerSpawn

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(classid == 0)
        {
            GameTextForPlayer(playerid, "~b~DeathMatcher!", 8000, 3);
        }
    if(classid == 1)
    {
         GameTextForPlayer(playerid, "~Y~Stunter!", 8000, 3);
    }
    if(classid == 2)
    {
        GameTextForPlayer(playerid, "~P~Drifter!", 8000, 3);
    }
But i need to do something OnPlayerSpawn if they set for example id 0 it give him a Weapon or something


Re: Classes [NEED HELP] - Vince - 20.08.2010

AddPlayerClass(id, x, y, z, angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3);


Re: Classes [NEED HELP] - matthewdriftking - 20.08.2010

Quote:
Originally Posted by Vince
Посмотреть сообщение
AddPlayerClass(id, x, y, z, angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3);
No listen me, I want to set thier time too.. with the classes id :S

Sry for my bad eng


Re: Classes [NEED HELP] - matthewdriftking - 20.08.2010

---> B.U.M.P <---


Re: Classes [NEED HELP] - MadeMan - 20.08.2010

pawn Код:
new PlayerClass[MAX_PLAYERS];

public OnPlayerRequestClass(playerid, classid)
{
    PlayerClass[playerid] = classid;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(PlayerClass[playerid] == 0)
        {

        }
    return 1;
}