Getting Vehicleid after CreateVehicle
#1

pawn Код:
new cg;
cg = CreateVehicle(522,vvx[playerid],vvy[playerid],vvz[playerid],vvr[playerid],AccountInfo[playerid][Color1],AccountInfo[playerid][Color2],10000000000000000000000);
PutPlayerInVehicle(playerid,cg,0);
i need to kno how to get the vehicleid of the createdvehicle...

i tried it with:

pawn Код:
//on top of the script
new ownedv[playerid];
//CreateVehicleFuntion  
new cg;
cg = CreateVehicle(522,vvx[playerid],vvy[playerid],vvz[playerid],vvr[playerid],AccountInfo[playerid][Color1],AccountInfo[playerid][Color2],10000000000000000000000);
PutPlayerInVehicle(playerid,cg,0);
ownedv[playerid] = GetPlayerVehicleID(playerid);
and when i used the ownedv[playerid] in other functions like

pawn Код:
DestroyVehicle(ownedv[playerid]);

nothin happends...
Reply


Messages In This Thread
Getting Vehicleid after CreateVehicle - by saiberfun - 20.06.2009, 21:29
Re: Getting Vehicleid after CreateVehicle - by Grim_ - 20.06.2009, 21:38
Re: Getting Vehicleid after CreateVehicle - by saiberfun - 20.06.2009, 21:41
Re: Getting Vehicleid after CreateVehicle - by Grim_ - 20.06.2009, 21:43
Re: Getting Vehicleid after CreateVehicle - by saiberfun - 20.06.2009, 21:51

Forum Jump:


Users browsing this thread: 1 Guest(s)