Lord Ganja
New member
How to check permanent account variable using query?
I wanted to check how much #PK_Points does a player have using bindatcmd but i don't know how to use query_sql
command: @checkpkpoints <player name> // Tried to create this script but I got errors xD
if ( set( .@nb, query_sql("SELECT account_id, value FROM acc_reg_num_db WHERE account_id="+getcharid(3,.@atcmd_parameters$[0])+" AND key='#PK_Points', .@aid, .@points) ) ) { if( !.@nb ) { message strcharinfo(0),"This only works on players who have PK Points"; end; } dispbottom .@points; }
Is it also possible to check if the attached <player name> is online/offline?
Like if the player is offline it will say
message strcharinfo(0),.@atcmd_parameter$[0]+" is offline";
Help me please. Thanks in advance!
I wanted to check how much #PK_Points does a player have using bindatcmd but i don't know how to use query_sql
command: @checkpkpoints <player name> // Tried to create this script but I got errors xD
if ( set( .@nb, query_sql("SELECT account_id, value FROM acc_reg_num_db WHERE account_id="+getcharid(3,.@atcmd_parameters$[0])+" AND key='#PK_Points', .@aid, .@points) ) ) { if( !.@nb ) { message strcharinfo(0),"This only works on players who have PK Points"; end; } dispbottom .@points; }
Is it also possible to check if the attached <player name> is online/offline?
Like if the player is offline it will say
message strcharinfo(0),.@atcmd_parameter$[0]+" is offline";
Help me please. Thanks in advance!