13.01.2012, 10:10
Im trying to make a cmd only able when in vehicleid 476, but it still works in all vehicles, how come?
i have tried this, but then it doesnt work at all
But with this it does work..in ALL vehicles and not just in ID 476
This is the commands, and they are dont being restricted to ID 476 as it should be, they works in all vehicles.
CODE:
i have tried this, but then it doesnt work at all
pawn Код:
if(IsPlayerInVehicle(playerid, 476))
pawn Код:
if(!IsPlayerInVehicle(playerid, 476))
CODE:
pawn Код:
COMMAND:unload(playerid,vehicleid, params[])
{
if(!IsPlayerInVehicle(playerid, 476))
{
new id = GetPlayerVehicleID(playerid);
DestroyObject(VehicleBomb[id][0]);
DestroyObject(VehicleBomb[id][1]);
VehicleFire[vehicleid] = 1;
}
return 1;
}
COMMAND:load(playerid,vehicleid, params[])
{
if(!IsPlayerInVehicle(playerid, 476))
{
new id = GetPlayerVehicleID(playerid);
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid,x,y,z);
AddVehicleMissiles(id,2.0,-1.05,0.0);
}
return 1;
}