Help with the /enter cmd
#1

Can I have 2 different /enter cmds without crashing the first?I mean I have one cmd /enter in my gamemode and when I add a 2nd cmd /enter in the filterscript,the first one doesnt work.Is there anyway to fix this?
Reply
#2

no, I believe you can't have 2 same commands gamemode.
Reply
#3

LOL?!
isnt possible(i think O.o)
Reply
#4

No, it isn't possible. But you could have commands like /enter subcmd1, /enter subcmd2.
Reply
#5

also , in the command , the first time you use the comand /enter you create a new vcariable
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new enter[MAX_PLAYERS];
enter[playerid]=0;
if(strcmp(cmdtext, "/enter", true) == 0) {
 if(enter[playerid]==0)
 {
    SendPlayerFormattedText(playerid,"This is the first time u use the command , use /enter again if u want 2nd usage");
//do your things if the command is the first time used;
enter[playerid]=1;
 return 1;
    }
else if(enter[playerid]==1)
{
    SendPlayerFormattedText(playerid,"This is the Second time u use the command , use /enter again if u want 1rst usage");
//do your things if the command is used 2nd time
enter[playerid]=0;//the 0 is if u want to return to the other command
  return 1;
    }
return 1;
}
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)