Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 10.06.2014
Hello !
I Created A /Car And Player When Use This Command A Menu (OnPlayerSelectedMenuRow) Show For Player.
So, I Wanna Do Something When First Vehicle Spawned Nothing Happen.But When Spawn The Secend Vehicle First
Vehicle Destroy
This Is The Pawn Code
Plz Help Me...
pawn Код:
new string[256]; format(string,sizeof(string),"%s Spawned.",car); SendClientMessage(playerid,COLOR_YELLOW,string);
carid = CreateVehicle(id,X+3,Y+2,Z,Angle,-1,-1,50000);
// PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
VehicleInfo[carid][bought] =playerid;
if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
Re: Destroy Vehicle ... [HELP ME] -
RenovanZ - 10.06.2014
Show your full code.
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 10.06.2014
Ajab...
This Is The All Code
Others Is Nothing
Pleas Some One Help ...
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 11.06.2014
Some One Help
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 11.06.2014
Up...Help...
Re: Destroy Vehicle ... [HELP ME] -
Weponz - 11.06.2014
Do:
Then destroy it and create it like so:
pawn Код:
DestroyVehicle(carid[playerid]);
carid[playerid] = CreateVehicle(id,X+3,Y+2,Z,Angle,-1,-1,50000);
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 11.06.2014
Weponz Not Help...
pawn Код:
if(Current == Car) {
new car[20],Float:X,Float:Y,Float:Z,Float:Angle,id,carid;
GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
switch(row) {
case 0: car = "Infernus", id = 411;
case 1: car = "NRG-500", id = 522;
case 2: car = "Turismo", id = 451;
case 3: car = "Sultan", id = 560;
case 4: car = "BF Injection", id = 424;
case 5: car = "Banshe", id = 429;
case 6: car = "Bullet", id = 541;
case 7: car = "SandKing", id = 495;
case 8: car = "JetMax", id = 493;
case 9: car = "Maverick", id = 487;
case 10: car = "Shamal", id = 519;
}
new string[256]; format(string,sizeof(string),"Shoma Mashin %s Entekhab Kardid.",car); SendClientMessage(playerid,COLOR_YELLOW,string);
carid = CreateVehicle(id,X+3,Y+2,Z,Angle,-1,-1,50000);
// PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
printf("[CAR] Admin %s(%d) Mashin %s Ra Spawn Kard.",PlayerName(playerid),playerid,car);
VehicleInfo[carid][bought] =playerid;
if(GetPlayerInterior(playerid)) LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid,GetPlayerVirtualWorld(playerid));
}
This Is The All Code Please Some One Help
Re: Destroy Vehicle ... [HELP ME] -
BroZeus - 12.06.2014
it is done like this
pawn Код:
LastCar[MAX_PLAYERS];//on top
//this the edited command
DestroyVehicle(LastCar[playerid]);//added this
new string[256]; format(string,sizeof(string),"Shoma Mashin %s Entekhab Kardid.",car); SendClientMessage(playerid,COLOR_YELLOW,string);
LastCar[playerid] = CreateVehicle(id,X+3,Y+2,Z,Angle,-1,-1,50000);//modified this
// PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 12.06.2014
Sorry
I Get This Error Code
.pwn(9416) : warning 203: symbol is never used: "carid"
And This Is The Line 9416 :
pawn Код:
new car[20],Float:X,Float:Y,Float:Z,Float:Angle,id,carid;
Re: Destroy Vehicle ... [HELP ME] -
MacT - 12.06.2014
pawn Код:
static carid;
carid= GetPlayerVehicleID(playerid);
Here you go
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 12.06.2014
MacT Where I Most Enter This Code ?
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 12.06.2014
Please Someone Help
Re: Destroy Vehicle ... [HELP ME] -
BroZeus - 13.06.2014
delete carid variable from declaration
[means from that line]
there is no use of it now
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 13.06.2014
BroZeus Please Add Me In Skype To I Contact You...
Re: Destroy Vehicle ... [HELP ME] -
MacT - 13.06.2014
Sorry, I was wrong little, yes this means you have unsused variable carid, delete it and also you got working your code or not?
Re: Destroy Vehicle ... [HELP ME] -
M0HAMMAD - 13.06.2014
Not Work
Please Some One Add Me In Skype To Help Me
Skype ID : mamad.venom