28.11.2008, 22:10
Then just define the vehicleid
Or the alternative to make it for the player and not the vehicle he types it in
pawn Код:
if(strcmp(cmdtext,"/cargodon",true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return 0;
new vehicleid = GetPlayerVehicleID(playerid);
SetTimerEx("CarGodMode",1000,"i",vehicleid);
return 1;
}
public CarGodMode(vehicleid)
{
SetVehicleHealth(vehicleid,5000);
return 1;
}
pawn Код:
if(strcmp(cmdtext,"/cargodon",true) == 0)
{
SetTimerEx("CarGodMode",1000,"i",playerid);
return 1;
}
public CarGodMode(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return 0;
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid,5000);
return 1;
}