Commands
#1

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
Reply
#2

I can't understand what do you mean. Please, use ****** translate or something so we can understand you.
Reply
#3

hmm i mean that
we cant use any cmd between the minigames
we should type /kill to exit
Reply
#4

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.
Reply
#5

See This One
pawn Код:
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
Reply
#6

This is just an example
pawn Код:
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;
}
Reply
#7

Quote:
Originally Posted by God'Z War
Посмотреть сообщение
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:
pawn Код:
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
Reply
#8

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
This is just an example
pawn Код:
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;
}
pawn Код:
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
Reply
#9

Quote:
Originally Posted by God'Z War
Посмотреть сообщение
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?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)