21.09.2010, 15:07
when typing /stats or /stats ID it's telling player is not connected blablah...
Any solutions?
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;
}