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; }
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); } }
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); } } |