24.01.2012, 12:04
(
Last edited by MasterJoker; 29/01/2012 at 08:12 AM.
)
Simple Shop Command [EXPLAINED]
Brought you by Mr.SmileyWinky!
![Wink](images/smilies/wink.png)
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.
Checks if player have 10$ if player doesn't have one the return SendClientMessage will be called.
if player has 10$. his 10 will be decrease
After giving -10$, sendclientmessage will be called (if you only have 10$)
will play the eating animation, EAT_Burger is animation for now theres no EAT_Hotdog animation
Have fun creating your own shop![Cheesy](images/smilies/biggrin.png)
once again brought you by Mr.SmileyWinky!
Brought you by Mr.SmileyWinky!
![Tongue](images/smilies/razz.gif)
![Wink](images/smilies/wink.png)
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
pawn Code:
#include <zcmd>
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");
pawn Code:
GivePlayerMoney(playerid, -10);
pawn Code:
SendClientMessage(playerid, MJCOLOR, "Thank you for buying my very delicious MJ Hotdog");
pawn Code:
ApplyAnimation(playerid, "FOOD", "EAT_Burger", 4.0,0,0,0,0,0,0); //Credits to lamarr007
Have fun creating your own shop
![Cheesy](images/smilies/biggrin.png)
once again brought you by Mr.SmileyWinky!
![Tongue](images/smilies/razz.gif)
![Wink](images/smilies/wink.png)