19.02.2012, 04:03
Ae galera,tem algum cуdigo para que possa recuperar vida quando estiver em uma ambulancia ?
E pra deixar o tanque mais resistente ?
valeu a todos
E pra deixar o tanque mais resistente ?
valeu a todos
//onvehiclespawn
if(GetVehicleModel(vehicleid)) == 432)
{
SetVehicleHealth(vehicleid,5000);
}
//seucomando
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 416)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid,-1,"Voce Foi Curado!");
}
public OnVehicleSpawn(vehicleid)
{
if(GetVehicleModel(vehicleid) == 432)
{
SetVehicleHealth(vehicleid, 5000.0);
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 416)
{
SetPlayerHealth(playerid, 100.0);
SendClientMessage(playerid, -1, "- Vocк foi curado! -");
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
new pWeapon = GetPlayerWeapon(playerid), up, down,
pKeys = GetPlayerKeys(playerid, pKeys, up, down);
if((pWeapon == 45 || pWeapon == 44) && (pKeys & KEY_FIRE))
return 0;
return 1;
}
public OnPlayerUpdate(playerid)
{
new pWeapon = GetPlayerWeapon(playerid);
new pKeys, ud, lr; pKeys = GetPlayerKeys(playerid, pKeys, ud, lr);
if(pWeapon == 44 || pWeapon == 45)
if((pKeys & KEY_FIRE) && !(IsPlayerInAnyVehicle(playerid)))
return 0;
return 1;
}