Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ice Cream System
- // By SimpalK from Scratch
- // Thanks for using ;)
- #include <a_samp>
- #include <zcmd>
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_RED 0xAA3333AA
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Ice Cream System - By SimpalK - Loaded ");
- print("--------------------------------------\n");
- CreateObject(170, 1030.96, 1361.74, 10.80, 92.00, 105.00, 66.00);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Ice Cream System - By SimpalK - Unloaded ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- CreateObject(170, 1030.96, 1361.74, 10.80, 92.00, 105.00, 66.00);
- return 1;
- }
- CMD:icecream(playerid, params[])
- {
- SetPlayerCheckpoint(playerid, 1032.3879,1362.8142,10.8203, 1.0);
- SendClientMessage(playerid, COLOR_RED,"Ice cream Shop is now Shown to you on Map.");
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(GetPlayerMoney(playerid) < 100)
- {
- SendClientMessage(playerid, COLOR_RED,"You Need $100 To buy Ice Cream.");
- }
- if(GetPlayerMoney(playerid) >= 100)
- {
- new IceCreams;
- IceCreams = random(4);
- switch(IceCreams)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Choclate Flavoured Ice Cream.");
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
- DisablePlayerCheckpoint(playerid);
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Vanilla Flavoured Ice Cream.");
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
- DisablePlayerCheckpoint(playerid);
- }
- case 2:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Butter Scotch Flavoured Ice Cream.");
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
- DisablePlayerCheckpoint(playerid);
- }
- case 3:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"You have Bought Mango Flavoured Ice Cream.");
- GivePlayerMoney(playerid, GetPlayerMoney(playerid) - 100);
- DisablePlayerCheckpoint(playerid);
- }
- }
- }
- return 1;
- }
- //////////////////////////////////////////////////////////////////////////////// Thanks for using!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement