Doesn't put me in the vehicle..
#1

I got this:

pawn Код:
new fRandom = random(sizeof(FarmWarRand));
        bringer[playerid] = CreateVehicle(504,FarmWarRand[fRandom][0],FarmWarRand[fRandom][1],FarmWarRand[fRandom][2],FarmWarRand[fRandom][3],colors[random(126)],colors[random(126)],10000);
        PutPlayerInVehicle(playerid,bringer[playerid],0);
this code should work but it doesn't i think it creates a car but doesn't put me in, anyone knows why?

edit: it creates the vehicle but doesn't put me in.
Reply
#2

How are you defining FarmWarRand?
Reply
#3

Код:
new Float:FarmWarRand[][] = {
{x,y,z,angle},
... so on
it creates the vehicle but doesn't put me in thats the prob.
Reply
#4

And show how you defined colors. Sorry.
Reply
#5

what colors?

edit: oh wait a sec

here:

Код:
new colors[127] =
{
	0,
and so on to 126
the colors work perfect again: it doesn't put me in veh
Reply
#6

Well sometimes if you have an error there it can make the compiler not say anything, but in game it will stop that section of code and not continue. But I guess this isn't the case.
Reply
#7

IS this in a fs or GM .IF GM try putting in a FS and vice versa.
Reply
#8

this is in the gamemode, i cannot put it in filterscript because everything what i got is related to the gamemode i can't do it that simply because every command every function is related to that, i got one menu which puts player invehicle but i can't see the difference between them everything is the same except for coordinates. creating the vehicle ongamemodeinit and then putting him in doesn't work too.
Reply
#9

uhh.. anyone? it is really annoying that it doesn't put me in the vehicle..
Reply
#10

Try to set a timer for AROUND 150 ms and then put you in vehicle, or do:

pawn Код:
while(!IsPlayerInVehicle(playerid, vehicleid)) PutPlayerInVehicle(playerid, vehicleid, seatid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)