player is not connected?
#1

when typing /stats or /stats ID it's telling player is not connected blablah...

pawn Код:
dcmd_stats(playerid, params[])
{
    new string[128];
    new targetid;
    new Float:ratio=floatdiv(gPlayer[playerid][kills], gPlayer[playerid][deaths]);
    new Float:ratio2=floatdiv(gPlayer[targetid][kills], gPlayer[targetid][deaths]);
    if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID || targetid == playerid)return SM(playerid,red,"Error: Player is not connected. To view your own stats: /stats without id!");
    if(sscanf(params, "u", targetid))
    {
        //code
    }
    else
    {
        //code
    }
    return 1;
}
Any solutions?
Reply


Messages In This Thread
player is not connected? - by Seven. - 21.09.2010, 15:07
Re: player is not connected? - by Desert - 21.09.2010, 15:09
Re: player is not connected? - by Rachael - 21.09.2010, 15:10
Re: player is not connected? - by Seven. - 21.09.2010, 15:13

Forum Jump:


Users browsing this thread: 1 Guest(s)