help me +rep[
#2

Make A Variable For God Command, Like This In the Top of the script:
pawn Код:
new godmode[MAX_PLAYERS];
Then, in the god command, do this:
pawn Код:
godmode[playerid] = 1;
that will make the player's value to 1 it is used if enabling the god mode, while disabling it use:
pawn Код:
godmode[playerid] = 0;
, and it will set it to the value 0 (default).

and in the command wshop do this:
pawn Код:
CMD:wshop(playerid, params[]){
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Weapon Shop", "Colt 45 ($75,000)\nDesert Eagle ($90,000)\nShotgun ($20,000)\nSawnoff Shotgun ($40,500)\nCombat Shotgun ($80,000)\nMicro SMG ($80,000)\nTec9 ($100,800)\nMP5 ($100,000)\nAK-47 ($300,000)\nM4 ($190,500)\nCountry Rifle ($150,000)\nSniper Rifle ($200,500)\nHeat-Seaking Rocket ($650,000)\nFlamethrower ($500,000)\nMinigun ($600,500)\nRPG ($700,000)\nParachute ($1.000)\n", "Buy!", "Cancel");
if(godmode[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"You cant use /god and /wshop together.Turn off your gode mode and then buy weapons");
return 1;}
That will check if the player's godmode value is to 1,if it is to 1,then it will send the message,if its not,then its working.
Reply


Messages In This Thread
help me +rep[ - by [SU]Spartan - 04.07.2014, 11:34
Re: help me +rep[ - by Youssef214 - 04.07.2014, 11:39
Re: help me +rep[ - by [SU]Spartan - 04.07.2014, 11:39
Re: help me +rep[ - by Youssef214 - 04.07.2014, 11:42
Re: help me +rep[ - by [SU]Spartan - 04.07.2014, 11:55
Re: help me +rep[ - by Youssef214 - 04.07.2014, 12:02
Re: help me +rep[ - by [SU]Spartan - 04.07.2014, 14:46
Re: help me +rep[ - by TheseMan - 22.05.2016, 09:27
Re: help me +rep[ - by SyS - 22.05.2016, 09:35

Forum Jump:


Users browsing this thread: 1 Guest(s)