02.04.2014, 19:19
Bom preciso da ajuda de vcs para criar o /deletaracc, o comando deve ser com y_commands e sscanf e que delete usando os comandos do mysql. Espero que me ajudem
static _String[100];
YCMD:deletarconta(playerid, params[], help)
{
if (!isnull(params))
{
SendClientMessage(playerid, -1, "/deletarconta [Conta]");
return 1;
}
format(_String, sizeof(_String), "SELECT * FROM `Usuarios` WHERE `Conta`='%s'",isnull(params));
mysql_function_query(Connect , _String, rue , "OnRespost_CMD", "is[80]", playerid , isnull(params));
return 1;
}
forward OnRespost_CMD( playerid , _Nick[] );
public OnRespost_CMD( playerid , _Nick[] )
{
static Row, Field;
cache_get_data(Row, Field, Connect);
if( Row )
{
format(_String, sizeof(_String), "DELETE FROM `Usuarios` WHERE `Conta`='%s'",_Nick);
mysql_function_query(Connect, _String, false, #, #);
}
else
{
SendClientMessage(playerid, -1, "Conta Nгo Existente!");
}
return 1;
}