AddPlayerClass Problem !
#3

OK... so you want to be a CJ and spawn in some random positons? If yes then follow my steps...

1. First we are going to make a variable! Just add this near the function OnGameModeInIt just like this:
PHP код:
new Float:Positions[][] =
{
    {
404.07292464.557416.5000356.6976},
    {-
1353.3026, -235.728114.1440315.7605},
    {
1319.95591269.481210.82030.2658},
    {-
2329.2629, -1626.5853483.7054331.0678},
    {-
302.03631525.284275.3594358.8640},
    {
1422.1212, -2541.333513.5469270.1175}
};
public 
OnGameModeInIt()
{
     
//Your code.

2. Now go to the function OnPlayerSpawn and add this:
PHP код:
public OnPlayerSpawn(playerid)
{
     new 
Random random(sizeof(Positions));
     
SetPlayerPos(playeridPositions[Random][0], Positions[Random][1],Positions[Random][2],Positions[Random][3]);
     
//Your other code...

And also ignore the warning! It doesn't affect anything! xD
Reply


Messages In This Thread
AddPlayerClass Problem ! - by Compiler - 22.12.2015, 17:04
Re: AddPlayerClass Problem ! - by Sebz - 22.12.2015, 17:10
Re: AddPlayerClass Problem ! - by ChristolisTV - 23.12.2015, 12:34

Forum Jump:


Users browsing this thread: 3 Guest(s)