[Pedido] Sistema de Material o mais simples possivel
#5

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/pegarmateriais"true))
    {
        if(
PlayerInfo[playerid][pLider] == 33 || PlayerInfo[playerid][pMembro] == 12)
        {
                        if(
IsPlayerInRangeOfPoint(playerid10.0XYZ)
                        {
                        
tmp strtok(cmdtextidx);
                        if(!
strlen(tmp))
                                {
                                        
SendClientMessage(playeridCOLOR_WHITE"Use: /mafia pegar [quantidade]  *Max p/ Vez = 55*");
                                        return 
1;
                                }
                                
moneys strval(tmp);
                                if(
moneys || moneys 1000) { SendClientMessage(playeridCOLOR_GREY"   O Nъmeros de Pacotes а ser pegos tem que ser mais que 1 e menos que 1000!"); return 1; }
                                new 
price moneys*100;
                                if(
GetPlayerMoney(playerid) > price)
                                {
                                        
format(stringsizeof(string), "* Vocк recebeu %d Materiais por R$%d."moneysprice);
                                
SendClientMessage(playeridCOLOR_LIGHTBLUEstring);
                                
GivePlayerMoney(playerid, - price);
                                
PlayerInfo[playerid][pMats] = moneys;
                                }
                                else
                                {
                                        
format(stringsizeof(string), "   Vocк nгo tem R$%d !"price);
                                
SendClientMessage(playeridCOLOR_GREYstring);
                                }
                        }
                }
                return 
1;
    }
    return 
0;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)