30.04.2015, 13:39
hello
i added when player is make /id, is can see player Ping
what wrong here? i get error
(26994)
(26999)
(26994)
(26999)
full code
i added when player is make /id, is can see player Ping
what wrong here? i get error
(26994)
Код:
error 001: expected token: ",", but found ";"
Код:
error 028: invalid subscript (not an array or too many subscripts): "GetPlayerPing"
Код:
(26999) : warning 215: expression has no effect
Код:
format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid);
Код:
format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing[id]));
Код:
CMD:id(playerid, params[]) { if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first."); if(IsPlayerConnected(playerid)) { new id, giveplayer[25], sstring[256]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFFFFFFFF,"Syntax: {FFFFFF} /id <Name>"); { if(IsPlayerConnected(id)) { if(id != INVALID_PLAYER_ID) { GetPlayerName(id, giveplayer, sizeof(giveplayer)); if(PlayerInfo[id][pSleeping] == 1) { if(PlayerInfo[id][pRank] > 0) { format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d) (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank],GetPlayerPing(playerid); SendClientMessage(playerid, COLOR_WHITE, sstring); } else { format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (AFK)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),GetPlayerPing[id])); SendClientMessage(playerid, COLOR_WHITE, sstring); } } else { if(PlayerInfo[id][pRank] > 0) { format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s (Rank %d)| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember]),PlayerInfo[id][pRank]),GetPlayerPing(playerid))); SendClientMessage(playerid, COLOR_WHITE, sstring); } else { format(sstring, sizeof(sstring), "{FFFFFF}ID: (%d) %s | Level: %d | %s| Ping: %d",id,giveplayer,PlayerInfo[id][pLevel],NumeFactiune(PlayerInfo[id][pMember],GetPlayerPing[id])); SendClientMessage(playerid, COLOR_WHITE, sstring); } } } else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); } else return SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected."); } } return 1; }