08.05.2011, 21:54
O titulo ja diz o mas o codigo seria
Код:
setplayerhealth(playerid, 300);?
setplayerhealth(playerid, 300);?
SetPlayerHealth( playerid, 300 );
SetPlayerHealth( playerid, 300 );
SetPlayerHealth(playerid, 300); //Caso queira mais de 300 modificar o 300 pelo nъmero.
public OnPlayerConnect(playerid)
new bool: JaNasceu[MAX_PLAYERS] = false; //inicio do GM
public OnPlayerSpawn(playerid) //na public
{
if(JaNasceu[playerid] == false)
{
SetPlayerHalth(playerid, 300);
JaNasceu[playerid] = true;
return 1;
}
return 1;
}
#define randomex( %0, %1 )( random( %1 - ( %0 + 0x1 ) ) + %0 );
new bool: JaNasceu[ MAX_PLAYERS ] = false;
public OnPlayerSpawn( playerid )
{
if( JaNasceu[ playerid ] == false )
{
SetPlayerHalth( playerid, randomex( 300, 500 ) );
JaNasceu[ playerid ] = true;
return true;
}
return true;
}
#define randomex( %0, %1 )( random( %1 - ( %0 + 0x1 ) ) + %0 );
new bool: JaNasceu[ MAX_PLAYERS ] = false;
public OnPlayerSpawn( playerid )
{
if( JaNasceu[ playerid ] == false )
{
SetPlayerHealth( playerid, randomex( 300, 500 ) );
JaNasceu[ playerid ] = true;
return true;
}
return true;
}