Use a command on dead players
#4

PHP код:
#include <a_samp>
new DEAD[MAX_PLAYERS];
public 
OnPlayerConnect(playerid)
{
    
DEAD[playerid] = 0;//player is alive
    
return 1;
}
public 
OnPlayerSpawn(playerid)
{
    
DEAD[playerid] = 0;//player is alive
    
return 1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    
DEAD[playerid] = 1;//player is dead
    
return 1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(
DEAD[playerid] == 1)
    {
        
//dead commands
        
if (strcmp("/mycommand"cmdtexttrue10) == 0)
        {
            return 
1;
        }
    }
    else
    {
        
//alive commands
        
if (strcmp("/mycommand"cmdtexttrue10) == 0)
        {
        }
    }
     return 
0;

Reply


Messages In This Thread
Use a command on dead players - by Ananisiki - 02.05.2014, 00:42
Re: Use a command on dead players - by Abagail - 02.05.2014, 01:07
Re: Use a command on dead players - by Ananisiki - 02.05.2014, 16:28
Re: Use a command on dead players - by ic3cr3am - 02.05.2014, 16:40
Re: Use a command on dead players - by Ananisiki - 02.05.2014, 22:34
Re: Use a command on dead players - by Aerotactics - 02.05.2014, 22:37
Re: Use a command on dead players - by DobbysGamertag - 02.05.2014, 22:47

Forum Jump:


Users browsing this thread: 2 Guest(s)