Car lock
#1

hey everybody

I want to spawn an car that is locked fore every player
Ialready found one topic but it gives me this error

C:\Users\Sander\Desktop\sa-mp scripting\r7\gamemodes\grandlarc.pwn(754) : error 010: invalid function or declaration

this is the code
Код:
public OnVehicleSpawn(vehicleid);
for(i == 0; i<MAX_PLAYERS; i++) //error in this line
{
SetVehicleParamsForPlayer(barricadecar[0],i, 0, 1);
SetVehicleParamsForPlayer(barricadecar[1],i, 0, 1);
SetVehicleParamsForPlayer(barricadecar[2],i, 0, 1);
}
can you help me

Thanks
Reply
#2

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
Reply
#3

doesn't work
Reply
#4

You're suppose to lock the vehicles OnVehicleStreamIn callback:
pawn Код:
public OnVehicleStreamIn(vehicleid, forplayerid)
{
  if(vehicleid == barricadecar[0] || vehicleid == barricadecar[1] || vehicleid == barricadecar[2])
  {
    SetVehicleParamsForPlayer(vehicleid, forplayerid, 0, 1);
  }
  return 1;
}
Reply
#5

its like this :
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
Reply
#6

It works, Thanks

------------------------------------
this forum is very usefull
------------------------------------
Reply
#7

Quote:
Originally Posted by sansko
It works, Thanks

------------------------------------
this forum is very usefull
------------------------------------
urw , indeed it is
Reply


Forum Jump:


Users browsing this thread: