18.10.2013, 19:14
Hey guys im here to give you my very first scritping to be honest its nothing but good for RP servers mostly
the basic places where you can get is near City Hall/PD and 1 is near bus stop((not unity)) you are abel to change the text inside the news paper "in Script" but yeah just to show you my first Scripting
Also here is my Buygun System
HAVE Fun Guys!!
the basic places where you can get is near City Hall/PD and 1 is near bus stop((not unity)) you are abel to change the text inside the news paper "in Script" but yeah just to show you my first Scripting
Код:
CMD:newspaper(playerid, params[]) { ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Los Santos News Paper", "Lets Welcome all New People to Los Santos!\nAlways Drive Safely by Putting on your Seatbelt((/sb))\nDont Speed in Town or you will be Arrested/Ticketed\nAlways Keep Rping and if you need Licenses go to City Hall\nUse /rules and /factionrules\nHave Fun with Us and Enjoy!","","Close"); SendClientMessage(playerid, COLOR_GREEN,"You Just Have taken News Paper to Read."); return 1; }
Код:
CMD:buyguns(playerid, params[]) { if(IsPlayerInRangeOfPoint(playerid, 40, 286.148986,-40.644397,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 286.800994,-82.547599,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 296.919982,-108.071998,1001.515625) || IsPlayerInRangeOfPoint(playerid, 40, 314.820983,-141.431991,999.601562) || IsPlayerInRangeOfPoint(playerid, 40, 316.524993,-167.706985,999.593750)) ShowPlayerDialog(playerid, DIALOGWEAPONS, DIALOG_STYLE_LIST, "Ammu-Nation Gun-Shop", "Deagle($10000)\nShotgun($2500)\nMP5($15000)\nSpas12($65000)\nAK-47($45000)\nM4($40000)\nSniper($75000)\nHalf vest($10000)\nFull vest($15000)","Buy","Cancel"); return 1; }
Код:
if(dialogid == DIALOGWEAPONS) { if(response) { switch(listitem) { case 0: { if(GetPlayerMoney(playerid) <1500) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought a deagle for $10000!"); GivePlayerCash(playerid, -10000); GivePlayerWeapon(playerid,24, 9999999); } case 1: { if(GetPlayerMoney(playerid) <2500) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought a shotgun for $2500!"); GivePlayerCash(playerid, -2500); GivePlayerWeapon(playerid, 25, 9999999); } case 2: { if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought an MP5 for $15000!"); GivePlayerCash(playerid, -15000); GivePlayerWeapon(playerid, 29 ,9999999); } case 3: { if(GetPlayerMoney(playerid) <170000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought a spas12 for $65000!"); GivePlayerCash(playerid, -65000); GivePlayerWeapon(playerid, 27, 9999999); } case 4: { if(GetPlayerMoney(playerid) <50000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought an AK-47 for $45000!"); GivePlayerCash(playerid, -45000); GivePlayerWeapon(playerid,30 ,9999999); } case 5: { if(GetPlayerMoney(playerid) <60000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought an M4 for $45000!"); GivePlayerCash(playerid, -45000); GivePlayerWeapon(playerid, 31, 9999999); } case 6: { if(GetPlayerMoney(playerid) <150000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money to buy this item!"); SendClientMessage(playerid, COLOR_GREY, "You bought a sniper for $75000!"); GivePlayerCash(playerid, -75000); GivePlayerWeapon(playerid, 34, 9999999); } case 7: { if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); new Float:armour; GetPlayerArmour(playerid, armour); if(armour == 100) return SendClientMessage(playerid, COLOR_GRAD2,"You already have a full vest!"); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You bought a half vest for $10000!"); GivePlayerCash(playerid, -10000); SetPlayerArmour(playerid, 50); } case 8: { if(GetPlayerMoney(playerid) <20000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!"); new Float:armour; GetPlayerArmour(playerid, armour); if(armour == 100) return SendClientMessage(playerid, COLOR_GREY, "You already have a full vest!"); SendClientMessage(playerid, COLOR_GREY, "You bought a full vest for $15000!"); GivePlayerCash(playerid, -15000); SetPlayerArmour(playerid, 100); } } return 1; } }
Код:
/*BuyGuns System by KaliKs*/ CreatePickup(1239, 1,288.2628,-109.2062,1001.5156); //BuyGuns Create3DTextLabel("Ammu Nation Gun Shop\nBuy Your Guns Here{66FF00}((/buyguns)){FFFFFF}", COLOR_WHITE, 288.2628,-109.2062,1001.5156, 30, 0, 1);
Код:
/* News Paper System by KaliKs */ CreatePickup(1239, 1,1505.2869,-1704.9502,14.0469); //NewsPaper1 CreatePickup(1239, 1,1208.2965,-1703.1249,13.5469);//NewsPaper3 CreatePickup(1239, 1,1505.2418,-1694.5598,14.0469); //NewsPaper2 Create3DTextLabel("News Paper\nUse {66FF00}/newspaper{FFFFFF} to read News Paper",COLOR_WHITE,1505.2869,-1704.9502,14.0469, 30, 0, 1); Create3DTextLabel("News Paper\nUse {66FF00}/newspaper{FFFFFF} to read News Paper",COLOR_WHITE,1505.2418,-1694.5598,14.0469, 30, 0, 1); Create3DTextLabel("News Paper\nUse {66FF00}/newspaper{FFFFFF} to read News Paper",COLOR_WHITE,1208.2965,-1703.1249,13.5469, 30, 0, 1);