[Ajuda] o que tem de errado com o codigo ? [SQLITE]
#9

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
PHP код:
CMD:changename(playeridparams[])
{
    new 
targetidnewname[24], query[256];
    if(
pInfo[playerid][pAdminLevel] >= 5) {
        if(
sscanf(params"ds[24]"targetidnewname)) return SendClientMessage(playerid,-1,""chat" /changename [playerid] [new name]");
        if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid,COLOR_RED,"Error: Player is not connected!");
        new 
n[MAX_PLAYER_NAME];
        
GetPlayerName(targetidnsizeof(n));
        
SetPlayerName(targetidnewname);
        
SendClientMessage(targetidCOLOR_RED,"You name has been changed. please re-loggin now.");
        new 
DBResult:dbrResult db_query(g_dbKeptAlivequery);
        
format(szQuerysizeof(szQuery), "UPDATE `users` SET `name` = '%s' WHERE `name` = '%s'"DB_Escape(newname), n);
        
db_free_result(dbrResult);
    }
    return 
1;

nem foi.. desisto :\
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)