[Ajuda] Curar PlayerID
#9

PHP код:
static CurarTime[MAX_PLAYERS];


stock CurarFlooding(playerid)
{
    if(
GetTickCount() - CurarTime[playerid] < 15000 )
    return 
1;
    return 
0;
}

public 
OnPlayerCommandText(playeridcmdtext[])
{

    new 
cmd[256], idx;
    
cmd strtok(cmdtextidx);

    if(
strcmp(cmd"/Curar"true) == 0)
    {
    if(
CurarFlooding(playerid)){SendClientMessage(playerid0xFF0000FF"vocк sу pode usar este comando cada 15 Segundo.");return 1;}
    
CurarTime[playerid] = GetTickCount();
    new 
tmp[256];
    
tmp strtok(cmdtext,idx);
    new 
Float:xxFloat:yyFloat:zz;
    
GetPlayerPos(playerid,  xx,yy,zz);//ou vice-versa com strval(tmp)
    
if(IsPlayerInRangeOfPoint(strval(tmp), 4.0xx,yy,zz))
    {
    if(
TeamGang[playerid] == 0)//Mйdico
    
{
    if(
strlen(tmp) == 0) return SendClientMessage(playerid0xFFFFFFFF"USE: /Curar [Nick/ID] no player que estiver prуximo");
    
SetPlayerArmour(strval(tmp), 70.0);
    
SetPlayerHealth(strval(tmp),100.0);
    
SendClientMessage(strval(tmp),0xFFFF00AA,"Vocк foi curado por um Mйdico.");
    }
    }
    
    return 
1;
}

    return 
1;

Reply


Messages In This Thread
Curar PlayerID - by Rodox_Mortein - 29.01.2013, 17:32
Respuesta: Curar PlayerID - by Parka - 29.01.2013, 17:49
Re: Curar PlayerID - by Rodox_Mortein - 29.01.2013, 18:00
Respuesta: Curar PlayerID - by Parka - 29.01.2013, 18:07
Re: Curar PlayerID - by Rodox_Mortein - 29.01.2013, 18:41
Respuesta: Curar PlayerID - by Parka - 29.01.2013, 18:44
Re: Curar PlayerID - by Dwayne-Pheonix - 29.01.2013, 19:29
Re: Curar PlayerID - by Rodox_Mortein - 30.01.2013, 01:14
Respuesta: Curar PlayerID - by Parka - 30.01.2013, 01:34
Re: Curar PlayerID - by Rodox_Mortein - 30.01.2013, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)