SA-MP Forums Archive
[HELP]Little help with Enable/Disable - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP]Little help with Enable/Disable (/showthread.php?tid=299878)



[HELP]Little help with Enable/Disable - [RDX]Dark_Angle - 27.11.2011

hello there,
i made a shop and how i make a cmd when i type /close so my shop close and when i type /on so shop on

please help me here and get a reputaion.

Код:
ShowPlayerDialogBox(playerid,dialogid,..................................................................);



Re: [HELP]Little help with Enable/Disable - sleepysnowflake - 27.11.2011

pawn Код:
//Top of the GameMode(s) script
new GameModeID=*YOURGAMEMODEID*;
//Somewhere:
CallRemoteFunction("gmShop", "i", GameModeID);

// In the admin script:
new gmID;
forward gmShop(GameModeID);

//Somewhere else:
public gmShop(GameModeID);
{
gmID = GameModeID;
return 1;
}

// You use it like this:
//(I am assuming you are using ZCMD.)

CMD:shop(playerid, params[])
{
switch(gmID)
case 1,2,3,4*OTHER GM ID's*: return SendClientMessage(blabla);
case 5,6,7*OTHER GM ID'
s*: return ShowPlayerDialogBox(blabla);
}