View Full Version : Commands
God'Z War
17/09/2012, 10:18 PM
Hey guys
i need your help
i am trying to make minigames Like Minigun
If Any one Typed Teleports Cmds . They will teleport With Minigun
in one server i saw : if any one typed cmd they will not teleport
it will show you should type /kill to exit dm
antonio112
17/09/2012, 10:21 PM
I can't understand what do you mean. Please, use ****** translate or something so we can understand you.
God'Z War
17/09/2012, 10:37 PM
hmm i mean that
we cant use any cmd between the minigames
we should type /kill to exit
mamorunl
17/09/2012, 11:52 PM
If the player goes to a minigame set a variable (for instance: "inMinigame[playerid] = true"). Then in OnPlayerCommandText() -> Note: if you use it! Else disable it in the commands itself <- disable all commands except for /kill by checking if inMinigame[playerid] == true.
God'Z War
22/09/2012, 12:20 PM
See This One
CMD:minigun(playerid,params[])
{
new str[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(PlayerinMMDM[playerid] == 1) return SendClientMessage(playerid,red,"You are already in Minigun Madness DM. Type /exitmm to leave Minigun Madness");
PlayerinMMDM[playerid] = 1;
SetPlayerSkin(playerid,287);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
SetPlayerPos(playerid,3137.7678,-5204.4316,19.8778);
SetPlayerInterior(playerid,0);
GivePlayerWeapon(playerid,38,9999999999);
format(str,sizeof(str),"%s has teleported to Minigun Madness [/MiniGun]",name);
SendClientMessageToAll(green,str);
SendClientMessage(playerid,yellow,"Teleported to Minigun Madness");
return 1;
}
how i can disable other commends
newbienoob
22/09/2012, 12:24 PM
This is just an example
CMD:heal(playerid,params[])
{
if(PlayerinMMDM[playerid] == 1) return SendClientMessage(playerid,-1,"You can't heal yourself while in dm!");
SetPlayerHealth(playerid,100);
return 1;
}
Pro_Drifter
22/09/2012, 12:41 PM
Hey guys
i need your help
i am trying to make minigames Like Minigun
If Any one Typed Teleports Cmds . They will teleport With Minigun
in one server i saw : if any one typed cmd they will not teleport
it will show you should type /kill to exit dm
You can use this:
if(!strcmp(cmdtext, "/minigun", true) || !strcmp(cmdtext, "/minigun", true))
{
SetPlayerPos2(playerid, 3137.7678,-5204.4316,19.8778, cmdtext);
SetPlayerWorldBounds(playerid, -459.0665, -628.7813, -464.1276, -567.4709);
GivePlayerWeapon(playerid, 38, 8000);
SetPlayerArmour(playerid, 100.0);
SetPlayerHealth(playerid, 100);
return 1;
}
Thats All Very easy
Tell me if i helped
God'Z War
22/09/2012, 01:18 PM
This is just an example
CMD:heal(playerid,params[])
{
if(PlayerinMMDM[playerid] == 1) return SendClientMessage(playerid,-1,"You can't heal yourself while in dm!");
SetPlayerHealth(playerid,100);
return 1;
}
CMD:heal(playerid,params[])
{
if(PlayerinMMDM[playerid] == 0) return SendClientMessage(playerid,-1,"You can't heal yourself while in dm!");
SetPlayerHealth(playerid,100);
return 1;
}
u should use 0 = disable
1= enable
mamorunl
22/09/2012, 01:23 PM
CMD:heal(playerid,params[])
{
if(PlayerinMMDM[playerid] == 0) return SendClientMessage(playerid,-1,"You can't heal yourself while in dm!");
SetPlayerHealth(playerid,100);
return 1;
}
u should use 0 = disable
1= enable
So then your code is a failure you mean? :-)
vBulletin® v3.8.6, Copyright ©2000-2019, Jelsoft Enterprises Ltd.