11.06.2015, 01:51
Hello, I have been trying to figure out how to get a player to write his Integer for a skin that he wants but I am having trouble figuring it out, I have tried a few different ways but I can't seem to find a good way to do it.
Here is my code:
Here is my code:
pawn Код:
if(dialogid == selectskin)
{
if(response)
{
new skinselected[MAX_PLAYERS]; //If I remove MAX PLAYERS it will give me an error claiming it must be assigned to a variable
format(skinselected, 100, "%d", inputtext);
if(strlen(skinselected) <= 100)
{
new string[128], Query[256];
format(string, sizeof(string), "You have chosen skin %d.", skinselected);
SendClientMessage(playerid, -1, string);
format(Query, sizeof(Query), "UPDATE users SET skin = %d WHERE username = '%s'", pInfo[playerid][USER_SKIN], DB_Escape(pInfo[playerid][USER_NAME]));
db_query(Database, Query);
}
}
}