SA-MP Forums Archive
putplayerinvehicle onplayerspawn? - 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: putplayerinvehicle onplayerspawn? (/showthread.php?tid=174751)



putplayerinvehicle onplayerspawn? - thomas.. - 06.09.2010

yeah..

i got this so far

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gClass[playerid] == 1)
    {
        Cars[playerid] = CreateVehicle(411, 0, 0, 0, 0, 0, 0, 60*10000);
        PutPlayerInVehicle(playerid, Cars[playerid], 0);
    }
    return 1;
}
but i dont know how to finish


Re: putplayerinvehicle onplayerspawn? - Hiddos - 06.09.2010

And what exactly do you want to do?


Re: putplayerinvehicle onplayerspawn? - thomas.. - 06.09.2010

say you have 5 skins

skin 1, when you spawn, you spawn inside a infernus
skin 2, exactly the same, but different car
skin 3 the same
skin 4 the same
skin 5 the same


Re: putplayerinvehicle onplayerspawn? - Relixious - 06.09.2010

You where very close..

pawn Код:
public OnPlayerSpawn(playerid)
{
    switch(gClass[playerid])
    {
        case 1:
        {
            Cars[playerid] = CreateVehicle(400, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        case 2:
        {
            Cars[playerid] = CreateVehicle(401, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        case 3:
        {
            Cars[playerid] = CreateVehicle(403, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        // Etc.
    }
    return 1;
}



Re: putplayerinvehicle onplayerspawn? - thomas.. - 06.09.2010

Quote:
Originally Posted by Relixious
Посмотреть сообщение
You where very close..

pawn Код:
public OnPlayerSpawn(playerid)
{
    switch(gClass[playerid])
    {
        case 1:
        {
            Cars[playerid] = CreateVehicle(400, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        case 2:
        {
            Cars[playerid] = CreateVehicle(401, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        case 3:
        {
            Cars[playerid] = CreateVehicle(403, 0, 0, 0, 0, 0, 0, 60*10000);
            PutPlayerInVehicle(playerid, Cars[playerid], 0);
        }
        // Etc.
    }
    return 1;
}
yeah i knew about that its just the variable for Cars[playerid]


Re: putplayerinvehicle onplayerspawn? - Relixious - 06.09.2010

Quote:
Originally Posted by thomas..
Посмотреть сообщение
yeah i knew about that its just the variable for Cars[playerid]
Then what do you want? we don't understand you.


Re: putplayerinvehicle onplayerspawn? - thomas.. - 06.09.2010

A script with all the variables sorted out ready for me to edit and use


Re: putplayerinvehicle onplayerspawn? - thomas.. - 06.09.2010

A script where all the variables are there, And it works perfectly, and compiles perfectly


Re: putplayerinvehicle onplayerspawn? - thomas.. - 07.09.2010

bump!