29.05.2014, 13:00
It's the same as :-
EDIT :-
So, i will do the same in,
?
pawn Код:
CMD:pingplayer(playerid, params[])
{
new ppString[500];
new tName[MAX_PLAYER_NAME];
new targetid;
GetPlayerName(targetid, tName, sizeof(tName));
new playerPing = GetPlayerPing(targetid);
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, 0xFF0000FF, "Correct Usage: /pingplayer [playerid]");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "Invalid Player ID");
format(pStringS, sizeof(pStringS), "{FFFFFF}You have pinged {%06x}%s(%d) {FFFFFF}- (Current Ping: {FF0000}%d{FFFFFF})", (GetPlayerColor(targetid) >>> 8), tName, targetid, pPing);
SendClientMessage(playerid, 0xFF0000FF, pStringS);
return 1;
}
Quote:
Dear rittik,believe me,changing lines and...wont work,just dont waste time for wrong posts,well it's easy to fix,well,he is Getting targetid's name before even detecting if he wrote the targetid,so it wont know which id you wrote,so it always get id 0's name,code should be:
pawn Код:
|
Код:
CMD:pingplayer(playerid, params[])