Question

Вообщем тут дело когда захожу на сервер пишу /setprefix всё нормально префикс пишется а в БД пишутся рандомные цифры

CMD:setprefix(playerid, params[])
{
	if(FULL_1 || FULL_2 || FULL_3 || FULL_4)
	{
	    if(sscanf(params,"ds[100]",params[0],params[1])) return cmdtip(playerid,"setprefix [ID] [òåêñò] Äëÿ óäàëåíèÿ ïðåôèêñà ââåäèòå:del");
	    if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, COLOR_RED, "ERROR:{FFFFFF} Èãðîê íå íàéäåí");
	    if(PlayerInfo[params[0]][bAdmin] == 0) return SendClientMessage(playerid, COLOR_RED, "[Îøèáêà]{FFFFFF} Èãðîê íå àäìèí!");
		new string[150];
     	if(strcmp(params[1], "del", true) == 0)
		{
      		format(PlayerInfo[params[0]][pPrefix], 64, "0");
      		format(string, 144, "%s óäàëèë ïðåôèêñ %s", PlayerInfo[playerid][pNames],PlayerInfo[params[0]][pNames]);
        	SendClientMessage(playerid, COLOR_WHITE, string);
      		SendClientMessage(params[0], COLOR_WHITE, string);
        	GetPVarInt(params[0], "pPrefix");
		}
		else
		{
	      	format(PlayerInfo[params[0]][pPrefix], 64, "0");
	      	format(PlayerInfo[params[0]][pPrefix], 64, "%s", params[1]);
	  		format(string, 144, "%s èçìåíèë ïðåôèêñ %s íà %s", PlayerInfo[playerid][pNames], PlayerInfo[params[0]][pNames], params[1]);
	      	SendClientMessage(playerid, COLOR_WHITE, string);
	  		SendClientMessage(params[0], COLOR_WHITE, string);
	  		SetPVarInt(playerid, "PrefID", params[0]);
     		new dialog[512];
	        strcat(dialog, "[0] Âûêëþ÷èòü öâåò\n[1] Çåëåíûé\n[2] Ñâåòëî çåëåíûé\n[3] ßðêî çåëåíûé\n[4] Áèðþçîâûé\n[5] Ƹëòî-Çåë¸íûé\n[6] Ò¸ìíî-Çåë¸íûé\n[7] Ñåðî-Çåë¸íûé\n[8] Êðàñíûé\n[9] ßðêî-Êðàñíûé\n[10] Îðàíæåâûé\n[11] Êîðè÷íåâûé\n[12] Ò¸ìíî-Êðàñíûé\n[13] Ñåðî-Êðàñíûé\n[14] Ƹëòî-Îðàíæåâûé\n[15] Ìàëèíîâûé\n[16] Ðîçîâûé\n[17] Ñèíèé\n[18] Ãîëóáîé\n[19] Ñèíÿÿ ñòàëü\n[20] Ñèíå-Çåë¸íûé\n[21] Ò¸ìíî-Ñèíèé\n[22] Ôèîëåòîâûé\n");
	        strcat(dialog, "[23] Èíäèãî\n[24] Ñåðî-Ñèíèé\n[25] Ƹëòûé\n[26] Êóêóðóçíûé\n[27] Çîëîòîé\n[28] Ñòàðîå çîëîòî\n[29] Îëèâêîâûé\n[30] Ñåðûé\n[31] Ñåðåáðî\n[32] ׸ðíûé\n[33] Áåëûé");
	      	ShowPlayerDialog(playerid,5678,DIALOG_STYLE_LIST, "Öâåò",dialog, "Âûáðàòü", "Îòìåíà");
        	GetPVarInt(params[0], "pPrefix");
		}
	}
	return true;
}

 кейс 

	case 5678:
		{
  			if(!response) return true;
			{
				new string[64];
				format(string, 64, "{%s}%s", Colors[listitem][colChatColor], PlayerInfo[GetPVarInt(playerid, "PrefID")][pPrefix]);
				format(PlayerInfo[GetPVarInt(playerid, "PrefID")][pPrefix], 64, "%s", string);
				GetPVarInt(playerid, "pPrefix");
			}
		}

mysql

pPrefix varchar(64) cp1251_general_ci   Нет Нет

Edited by Дмитрий1

Share this post


Link to post

2 answers to this question

  • 0

Всё сам решил

Share this post


Link to post
  • 0

@Дмитрий1 если сами решили, выложите ответ к своему решению. Другим пользователям с подобной проблемой будет полезно. 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content