NRG DestroyVehicle
#8

Quote:
Originally Posted by GNGification
Посмотреть сообщение
Ah now I got it

pawn Код:
new vehicle[MAX_VEHICLES];
pawn Код:
if (strcmp("/nrg", cmdtext, true, 10) == 0)    
{      
       new Float:X,Float:Y,Float:Z;      
       GetPlayerPos(playerid,X,Y,Z);      
       vehicle = CreateVehicle(522,X,Y,Z,0,-1,-1,-1),0);
       PutPlayerInVehicle(playerid,vehicle(522,X,Y,Z,0,-1,-1,-1),0);      
       return 1;    
}
OnPlayerExitVehicle
pawn Код:
if(GetPlayerVehicleID == vehicle)
{
       SetTimer("destroy", SETYOURTIMEHERE, false);
       return 1;
}
pawn Код:
forward destroy()[COLOR="Red"];[/COLOR]
public destroy()
{
      DestroyVehicle(vehicle);
      return 1;
}
I cannot make sure that works because im really tired, but atleast you get the idea
ERROR + WARNING:

gm.pwn(1202) : error 035: argument type mismatch (argument 1)

line: public destroy()
{
DestroyVehicle(vehicle); => ( 1202)
return 1;
}

gm.pwn(10553) : warning 219: local variable "vehicle" shadows a variable at a preceding level

line: public NitroReset()
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerInInvalidNosVehicle(i,GetPlayerVehicle ID(i)))
{
new vehicle = GetPlayerVehicleID(i); =>(10553)
AddVehicleComponent(vehicle, 1010);
}
}
}



WTF?!?!?
Reply


Messages In This Thread
NRG DestroyVehicle - by Cpt.Shady - 17.03.2012, 21:36
Re: NRG DestroyVehicle - by GNGification - 17.03.2012, 21:39
Re: NRG DestroyVehicle - by Cpt.Shady - 17.03.2012, 21:41
Re: NRG DestroyVehicle - by GNGification - 17.03.2012, 21:45
Re: NRG DestroyVehicle - by Cpt.Shady - 17.03.2012, 21:49
AW: NRG DestroyVehicle - by BigETI - 17.03.2012, 21:56
Re: NRG DestroyVehicle - by GNGification - 17.03.2012, 21:57
Re: NRG DestroyVehicle - by Cpt.Shady - 17.03.2012, 22:12
Re: NRG DestroyVehicle - by GNGification - 17.03.2012, 22:29
Re: NRG DestroyVehicle - by Cpt.Shady - 17.03.2012, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)