Server Crash
#4

Command:
PHP код:
CMD:shop(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid7.02498.2661, -1687.134313.4928))
    {
        
ShowPlayerDialog(playeridDIALOG_SHOPDIALOG_STYLE_LIST"Shop"" Armor ($5000)\nSpas-12 ($5000)\nAK47 ($5000)\nM4 ($5000)\nSniper ($5000)\nDeagle ($3000)\nShotgun ($2000)\nMP5 ($2000)""Buy""Close");
    }
    return 
1;


Dialog:
PHP код:
    else if(dialogid == DIALOG_SHOP)
    {
        switch(
listitem)
        {
            case 
0//Vest/armour
            
{
            if(
GetPlayerMoney(playerid) < 6000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -5000);
            
SetPlayerArmour(playerid100);
            }
            case 
1//Spas-12
            
{
            if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -5000);
            
GivePlayerGun(playerid2750); 
            }
            case 
2//AK47
            
{
            if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -5000);
            
GivePlayerGun(playerid3050); 
            }
            case 
3//M4
            
{
            if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -5000);
            
GivePlayerGun(playerid3150); 
            }
            case 
4//Sniper
            
{
            if(
GetPlayerMoney(playerid) < 5000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -5000);
            
GivePlayerGun(playerid3450); 
            }
            case 
5//Deagle
            
{
            if(
GetPlayerMoney(playerid) < 3000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -3000);
            
GivePlayerGun(playerid2450); 
            }
            case 
6//Shotgun
            
{
            if(
GetPlayerMoney(playerid) < 2000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -2000);
            
GivePlayerGun(playerid2550); 
            }
            case 
7//MP5
            
{
            if(
GetPlayerMoney(playerid) < 2000) return SendClientMessage(playeridCOLOR_WHITE"You don't have enough money for that.");
            
GivePlayerCash(playerid, -2000);
            
GivePlayerGun(playerid2950); 
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
Server Crash - by IndependentGaming - 11.05.2015, 15:48
AW: Server Crash - by Kaliber - 11.05.2015, 16:06
Re: Server Crash - by Toxik - 11.05.2015, 16:20
Re: Server Crash - by IndependentGaming - 11.05.2015, 16:39
Re: Server Crash - by IndependentGaming - 11.05.2015, 18:17
Re: Server Crash - by Konstantinos - 11.05.2015, 18:27
Re: Server Crash - by IndependentGaming - 11.05.2015, 18:28
Re: Server Crash - by Konstantinos - 11.05.2015, 18:39
Re: Server Crash - by IndependentGaming - 11.05.2015, 18:48
Re: Server Crash - by IndependentGaming - 12.05.2015, 13:20

Forum Jump:


Users browsing this thread: 3 Guest(s)