how???
#1

how can I make this command to change the age of the player ..
example, I wanted that when he typed in the old box he would change his age ...
here is the script. I'm not getting.
Код:
if(response)
	{
		if(dialogid == MENUAGE)
		{
	    //tmp = strtok(cmdtext, idx);
      //new age;
			//age = strval(tmp);
      //giveplayerid = ReturnUser(tmp);
			//tmp = strtok(cmdtext, idx);
			//age = strval(tmp);
			new giveplayer[MAX_PLAYER_NAME];
      new age = PlayerInfo[playerid][pAge];
      PlayerInfo[playerid][pAge] = age;
			GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
			format(string,sizeof(string),"You have %d year of age.",PlayerInfo[playerid][pAge]);
			SendClientMessage(playerid,COLOR_YELLOW2,string);
      //SendClientMessage(playerid,COLOR_LIGHTRED,"? (Brasil/EUA/RUSSA)");
	
		}
	}
Код:
if(strcmp(cmd, "/myage", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
      ShowPlayerDialog(playerid,MENUDEIDADE,DIALOG_STYLE_INPUT,"OK"," What is you age??","OK","Cancel");
	  }
	  return 1;
	}
Reply
#2

bump... /\
Reply
#3

You could try this (i think this is what you mean).

Код:
if(response)
{
	if(dialogid == MENUAGE)
	{
	  new tmp[256],idx;
		tmp = strtok(inputtext, idx);
		new age = strval(tmp);
		
		PlayerInfo[playerid][pAge] = age;
		
		format(string,sizeof(string),"You are now %d years old.", PlayerInfo[playerid][pAge]);
		SendClientMessage(playerid, COLOR_YELLOW2, string);
	}
}
Reply
#4

Quote:
Originally Posted by Anwix
You could try this (i think this is what you mean).

Код:
if(response)
{
	if(dialogid == MENUAGE)
	{
	  new tmp[256],idx;
		tmp = strtok(inputtext, idx);
		new age = strval(tmp);
		
		PlayerInfo[playerid][pAge] = age;
		
		format(string,sizeof(string),"You are now %d years old.", PlayerInfo[playerid][pAge]);
		SendClientMessage(playerid, COLOR_YELLOW2, string);
	}
}
Very THANKS!
I love you (L)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)