SA-MP Forums Archive
[FilterScript] 24/7 System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] 24/7 System (/showthread.php?tid=455915)



24/7 System - Vrag - 03.08.2013

Put this in
OnPlayerCommandText
Код:
if(strcmp(cmdtext,"/buy",true)==0) 
 if(IsPlayerInRangeOfPoint(playerid, 10.0, -30.8246,-28.4104,1003.5573)) 
{ 
    ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Shop List","$15 - Condoms\n$5 - Chips\n$5 - Cola\n$3 - Burger\n$500 - Civilian Vest\n$100 - Camera\n$50 - Baseball Bat\n$50 - Wooden Cane\","Purchase","Exit"); 
       return 1; 
}
Put this in
OnDialogResponse
Код:
if(dialogid==1 && response==1) 
if(dialogid==1 && response==1) 
{ 

switch(listitem) 
    { 
        case 0: 
        { 
        if(GetPlayerMoney(playerid) <15) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid,0xFF9900AA,"You have bought condoms for $15!"); 
        GivePlayerMoney(playerid, -15); 
        SetPlayerArmour(playerid, pArmour+5); 
            } 
        case 1: 
        { 
        if(GetPlayerMoney(playerid) <9) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a bag of chips for $5"); 
        GivePlayerMoney(playerid, -9); 
        ApplyAnimation(playerid,"VENDING", "vend_eat1_P",4.1,0,1,1,1,1,1); 
        } 
        case 2: 
        { 
        if(GetPlayerMoney(playerid) <3) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pHealth; 
        GetPlayerHealth(playerid, Float:pHealth); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a can of cola for $3"); 
        GivePlayerMoney(playerid, -3); 
        SetPlayerHealth(playerid, pHealth+10); 
        } 
        case 3: 
        { 
        if(GetPlayerMoney(playerid) <3) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a burger for $3"); 
        SetPlayerAttachedObject(playerid, 4, 2880, 5); 
        GivePlayerMoney(playerid, -3); 
        ApplyAnimation(playerid,"VENDING", "vend_eat1_P",4.1,0,1,1,1,1,1); 
        SetPlayerArmour(playerid, pArmour+3); 
        SendClientMessage(playerid, 0xD6D6D6AA, "((Use {219900}/removeobjects{D6D6D6} to remove the object!))"); 
        } 
        case 4: 
        { 
        if(GetPlayerMoney(playerid) <500) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a Civilian vest for $500"); 
        GivePlayerMoney(playerid, -500); 
        SetPlayerArmour(playerid, pArmour+50); 
        } 
        case 5: 
        { 
        if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a {13D4A3}Camera{D6D6D6} for $100"); 
        GivePlayerMoney(playerid, -125); 
        GivePlayerWeapon(playerid, 43, 100); 
        } 
        case 6: 
        { 
        if(GetPlayerMoney(playerid) <35) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a {13D4A3}Baseball Bat{D6D6D6} for $50"); 
        GivePlayerMoney(playerid, -50); 
        GivePlayerWeapon(playerid, 5, 0); 
        } 
        case 7: 
        { 
        if(GetPlayerMoney(playerid) <50) return SendClientMessage(playerid,0xAA3333AA, "You do not have enough money!"); 
        new Float:pArmour; 
        GetPlayerArmour(playerid, Float:pArmour); 
        SendClientMessage(playerid, 0xD6D6D6AA, "You purchased a {13D4A3}Wooden Cane{D6D6D6} for $50"); 
        GivePlayerMoney(playerid, -50); 
        GivePlayerWeapon(playerid, 15, 0); 
        }
WARNING:Some orders of this items are from my server!


Re: 24/7 System - a.z.a.r - 03.08.2013

o.O

this is your filterscript?

Clap! clap! Clap! Clap! Clap!


Re: 24/7 System - Vrag - 03.08.2013

Well someone told me how to make dialog


Re: 24/7 System - Tuntun - 03.08.2013

Uhoooo god!


Re: 24/7 System - Vrag - 03.08.2013

Whaaat?


Re: 24/7 System - Sellize - 03.08.2013

Straight up horrible


Re: 24/7 System - Naruto_Emilio - 04.08.2013

Obviously this is the worst script I've ever seen on my life...


Re: 24/7 System - Sellize - 05.08.2013

Oh wow he -repped me for telling him his script sucks ass


Re: 24/7 System - Joshman543 - 05.08.2013

Give him credit for trying to learn how to script.


Re: 24/7 System - hossa - 30.08.2013

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
Obviously this is the worst script I've ever seen on my life...
dude, quit learning pawn.