SA-MP Forums Archive
[Pedido] graninha paramedido - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] graninha paramedido (/showthread.php?tid=533692)



graninha paramedido - chefaoBR - 25.08.2014

Galera alguem pode por para o paramedio ganha uma graninha apуs ele aplicar o comando ? alguem sabe ajude +rep

PHP код:
if(strcmp(cmd"/curativo"true) == 0)
    {
        
format(filesizeof(file), PASTA_CONTASGetPlayerNameEx(playerid));
        if(
dini_Int(file"Profissao") == Paramedico || dini_Int(file"aAdmin") == || PlayerInfo[playerid][SCON] == true)
        {
            new 
plid;
            if(
sscanf(cmdtext"s[10]u"cmdplid))
            {
                
SendClientMessage(playeridVermelho"Use: /curativo [id]");
                return 
1;
            }
            if(
IsPlayerInAnyVehicle(plid) || IsPlayerInAnyVehicle(playerid))
            {
                
SendClientMessage(playeridVermelho"Alguem estб dentro de um carro.");
                return 
1;
            }
            if(
plid == playerid)
            {
                
SendClientMessage(playeridVermelho"Vocк nгo consegue curar vocк mesmo.");
                return 
1;
            }
            if(
IsPlayerConnected(plid))
            {
                if(
GetDistanceBetweenPlayers(plidplayerid) < 21)
                {
                    
SetPlayerHealth(plid100.0);
                    
SendClientMessage(playeridCOLOR_GREEN"Missгo cumprida!");
                    
SendClientMessage(plidCOLOR_WHITE"Um paramйdico aplicou uma injeзгo e vocк melhoro!");
                }
                else
                {
                    
SendClientMessage(playeridVermelho"Chegue mais perto para aplicar o curativo!");
                }
            }
            else
            {
                
SendClientMessage(playeridVermelho"O(A) jogador(a) nгo estб conectado.");
            }
        }
        else
        {
            
SendClientMessage(playeridVermelho"Apenas paramйdicos podem usar este comando!");
        }
        return 
1;
    } 



Re: graninha paramedido - Gii - 25.08.2014

https://sampwiki.blast.hk/wiki/GivePlayerMoney_PT


Re: graninha paramedido - FallweN - 25.08.2014

pawn Код:
if(strcmp(cmd, "/curativo", true) == 0)
{
    format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
    if(dini_Int(file, "Profissao") == Paramedico || dini_Int(file, "aAdmin") == 1 || PlayerInfo[playerid][SCON] == true)
    {
        new plid;

        if(sscanf(cmdtext, "s[10]u", cmd, plid))
        {
            SendClientMessage(playerid, Vermelho, "Use: /curativo [id]");
            return 1;
        }
        if(IsPlayerInAnyVehicle(plid) || IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, Vermelho, "Alguem estб dentro de um carro.");
            return 1;
        }
        if(plid == playerid)
        {
            SendClientMessage(playerid, Vermelho, "Vocк nгo consegue curar vocк mesmo.");
            return 1;
        }
        if(IsPlayerConnected(plid))
        {
            if(GetDistanceBetweenPlayers(plid, playerid) < 21)
            {
                SetPlayerHealth(plid, 100.0);
                SendClientMessage(playerid, COLOR_GREEN, "Missгo cumprida!");
                SendClientMessage(plid, COLOR_WHITE, "Um paramйdico aplicou uma injeзгo e vocк melhoro!");
                GivePlayerMoney(playerid, 500); //500 Й O Valor que ele irб receber aumente se quiser
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Chegue mais perto para aplicar o curativo!");
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "O(A) jogador(a) nгo estб conectado.");
        }
    }
    else
    {
        SendClientMessage(playerid, Vermelho, "Apenas paramйdicos podem usar este comando!");
    }
    return 1;
}