Help with the /enter cmd
#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


Messages In This Thread
Help with the /enter cmd - by pierhs - 02.09.2009, 18:23
Re: Help with the /enter cmd - by iMonk3y - 02.09.2009, 18:43
Re: Help with the /enter cmd - by [XST]O_x - 02.09.2009, 18:53
Re: Help with the /enter cmd - by Correlli - 02.09.2009, 18:55
Re: Help with the /enter cmd - by HuRRiCaNe - 02.09.2009, 19:39

Forum Jump:


Users browsing this thread: 2 Guest(s)