Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[DINI] Check Offline Player Money

$
0
0
Hello everyone
I'm using dini and I'm trying to make a command which shows the cash of an offline player. But I'm getting an error. I've tried everything but I can't make it work..please help me! :(
Code:

PHP Code:

CMD:getmoney(playeridparams[])
{

    if(
isnull(params)) {
        return 
SendClientMessage(playerid, -1"Correct Usage: /GetMoney [PlayerFile]");
    }

    new 
filename[MAX_PLAYER_NAME+18];
    
format(filenamesizeof(filename), "/ladmin/users/%s.sav"params);

    if(!
fexist(filename)) {
        return 
SendClientMessage(playerid, -1"That account doesn't exist!");
    }

    new
        
File:file fopen(filenameio_read),
        
string[128],
        
Name[20],
        
Value[20],
        
Money;

    while(
fread(filestring)) {
        if(!
sscanf(string"p<=>s[20]s[20]",NameValue)) {
    if(!
strcmp(Name"money")) { //HERE IS THE ERROR
                
Money strval(Value);
                break;
            }
        }
    }

    
format(stringsizeof(string), "Money from %s's account is $%d"paramsMoney);
    
SendClientMessage(playerid, -1string);
    return 
true;


Compile Error:
PHP Code:

error 035argument type mismatch (argument 1

Help me please, I really don't know what to do. -Thanks in advance.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>