07.08.2009, 20:22
GetPlayerVehicleID(carcreated);
Your carcreated variable is not a player ID, which GetPlayerVehicleID function needs. It is the vehicle ID, because CreateVehicle function returns the vehicle ID. So, basically this means that now the GetPlayerVehicleID function is not working correctly.
Just like MadeMan said, use this one:
And to destroy/lock the vehicle:
Your carcreated variable is not a player ID, which GetPlayerVehicleID function needs. It is the vehicle ID, because CreateVehicle function returns the vehicle ID. So, basically this means that now the GetPlayerVehicleID function is not working correctly.
Just like MadeMan said, use this one:
pawn Код:
playercarid[playerid] = CreateVehicle(CarId,Carx,Cary,Carz,Carangle,randcolor,randcolor,10000);
pawn Код:
DestroyVehicle(playercarid[playerid])