02.09.2009, 19:39
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;
}