23.03.2015, 17:58
Eu particularmente gosto muito de fazer assim:
No GM:
func.inc
No GM:
PHP код:
public OnPlayerSpawn(playerid)
{
GivePlayerSpawnWeapons(playerid);
FillPlayerHealth(playerid,200.0);
return 1;
}
PHP код:
stock FillPlayerHealth(playerid,Float:pHP)
{
new Float:HP, Float:AP;
HP = pHP >= 100 ? 100 : pHP;
AP = pHP - HP;
SetPlayerHealth(playerid,HP);
SetPlayerArmour(playerid,AP);
}
stock GivePlayerSpawnWeapons(playerid)
{
GivePlayerWeapon(playerid,24,250);
GivePlayerWeapon(playerid,25,100);
GivePlayerWeapon(playerid,31,500);
}