[Help] [ /getgift ]
#1

hello guys how to make to can type /getgift once of PayDay?
PHP код:
CMD:getgift(playeridparams[])
{
   if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"Trebuie sa te loghezi  mai intai.");
   if(
IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_WHITE,"{37B9C8}Please get out of the car.");
   if(!
IsPlayerInRangeOfPoint(playerid7.01516.1532,-1655.5228,13.5392))  return SCM(playerid,COLOR_WHITE"Nu esti la locul unde poti folosi [/getgift] (LSPD/Spawn Civil).");
   {
       {
            new 
Random random(6);
            switch(
Random)
            {
                case 
0:
                {
                    
GivePlayerCash(playerid,25000);
                    
Update(playerid,pCashx);
                    
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat 25.000$");
                }
                case 
1:
                {
                      
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat 5 coins");
                   }
                case 
2:
                {
                    
PlayerInfo[playerid][pMats] += 50000;
                    
Update(playerid,pMatsx);
                    
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat 50000 materiale");
                }
                case 
3:
                {
                    
PlayerInfo[playerid][pDrugs] += 10;
                    new 
wakaname[25],str2[128];
                    
GetPlayerName(playerid,wakaname,sizeof(wakaname));
                    
format(str2,sizeof(str2),"UPDATE users SET `Drugs`='%d' WHERE `name`='%s'",PlayerInfo[playerid][pDrugs],wakaname);
                    
mysql_query(SQL,str2);
                    
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat 10 grame de droguri");
                }
                case 
4:
                {
                    
PlayerInfo[playerid][pExp] += 2;
                    
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat 2 respect points");
                }
                case 
5:
                {
                    
SendClientMessage(playeridCOLOR_WHITE"Felicitari!Ai castigat inca 2 cadouri! [/getgift]");
                }
            }
        }
   }
   return 
1;

sorry for my bad english
Reply
#2

up ? please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)