Simple Shop Command [EXPLAINED] -
MasterJoker - 24.01.2012
Simple Shop Command [EXPLAINED]
Brought you by Mr.SmileyWinky!
Introduction:
Planning to add a shop on your GM that decrease your money?, well then you go to right tutorial.
Step by Step:
First of all add
under the a_samp or in other includes
You can download zcmd.inc on Filterscript and Includes section
second is we will gonna create the command. i will put my command at the bottom of my script.
pawn Code:
COMMAND:MJHotDog(playerid, params[])
{
if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, MJCOLOR, "You do not have enough money to buy my hotdog special");
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, MJCOLOR, "Thank you for buying my very delicious MJ Hotdog");
//Eating Animation
return 1;
}
pawn Code:
if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, MJCOLOR, "You do not have enough money to buy my hotdog special");
Checks if player have 10$ if player doesn't have one the return SendClientMessage will be called.
pawn Code:
GivePlayerMoney(playerid, -10);
if player has 10$. his 10 will be decrease
pawn Code:
SendClientMessage(playerid, MJCOLOR, "Thank you for buying my very delicious MJ Hotdog");
After giving -10$, sendclientmessage will be called (if you only have 10$)
pawn Code:
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0,0,0,0,0,0,0); //Credits to lamarr007
will play the eating animation, EAT_Burger is animation for now theres no EAT_Hotdog animation
Have fun creating your own shop
once again brought you by
Mr.SmileyWinky!
Re: Simple Shop Command [EXPLAINED] -
MasterJoker - 25.01.2012
Thread updated!
Re: Simple Shop Command [EXPLAINED] -
MasterJoker - 28.01.2012
why adding picture? its just a simple command
Re: Simple Shop Command [EXPLAINED] -
Tanush123 - 28.01.2012
simple but nice 8/10
Re: Simple Shop Command [EXPLAINED] -
MasterJoker - 28.01.2012
thanks i'm making a gamemode features with my some tutorials
Re: Simple Shop Command [EXPLAINED] -
Ballu Miaa - 28.01.2012
Good one Joker!
Re: Simple Shop Command [EXPLAINED] -
lamarr007 - 28.01.2012
Nice tut

For animation you can use this :
pawn Code:
EAT_Burger
EAT_Chicken
EAT_Pizza
Re: Simple Shop Command [EXPLAINED] -
Daniel_Ram - 28.01.2012
nice work man :d 7/10