[Ajuda] Comando daradmin com UPDATE
#2

Vocк getou o noem do player corretamente, sу nгo soube representar depois. Vocк getou o nome do player promovido para a variavel 'nome', sendo assim na query onde vc colocou 'id' seria 'nome' e a mesma coisa na frase.
Код:
CMD:daradmin(playerid, parms[])
{
	new id, level, query[128], nome[MAX_PLAYER_NAME], Msg[100];
	if(sscanf(parms, "us[128]", id, level)) return SendClientMessage(playerid,-1,"Use /daradmin ID <Level: 2 - 5 > VIP Level 2 ");
    GetPlayerName(id, nome, sizeof(nome));
    mysql_format(mysql, query, sizeof(query), "UPDATE `contas` SET level = '%d' WHERE `nome` = '%s'", level, nome);
	mysql_query(mysql, query);
    format(Msg, sizeof(Msg), "{00FF80}Parabens, %s foi promovido !",nome);
	SendClientMessageToAll(-1,Msg);
	return 1;
}
Reply


Messages In This Thread
Comando daradmin com UPDATE - by Luucass - 07.05.2015, 21:18
Re: Comando daradmin com UPDATE - by GabrielDias_Invision - 07.05.2015, 21:26
Re: Comando daradmin com UPDATE - by Dayvison_ - 07.05.2015, 21:30
Re: Comando daradmin com UPDATE - by GabrielDias_Invision - 07.05.2015, 21:34
Re: Comando daradmin com UPDATE - by Luucass - 07.05.2015, 21:57
Re: Comando daradmin com UPDATE - by Dayvison_ - 07.05.2015, 21:59
Re: Comando daradmin com UPDATE - by Luucass - 07.05.2015, 22:04
Re: Comando daradmin com UPDATE - by Dayvison_ - 07.05.2015, 22:43
Re: Comando daradmin com UPDATE - by GabrielDias_Invision - 07.05.2015, 23:02
Re: Comando daradmin com UPDATE - by Luucass - 07.05.2015, 23:12

Forum Jump:


Users browsing this thread: 1 Guest(s)