14.01.2011, 23:14
pawn Код:
dcmd_getinfo(playerid, params[])
{
if(PInfo[playerid][Level] >= 1)
{
new str[256], pid, pveh, pping, pcash, Float:phealth, Float:parmour, plevel;
if(!strval(params)) return SendClientMessage(playerid, RED, "USAGE: /getinfo <playerid>");
pid = strval(params);
if(IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID)
{
pveh = GetPlayerVehicleID(pid);
pping = GetPlayerPing(pid);
pcash = GetPlayerMoney(pid);
GetPlayerHealth(pid, phealth);
GetPlayerArmour(pid, parmour);
plevel = PInfo[pid][Level];
format(str, sizeof(str), "Player ID: %d \n\n Vehicle ID: %d \n\n Player Ping: %d \n\n Player Cash: %d \n\n Player Health: %d \n\n Player Armour: %d, Player Level: %d", pid, pveh, pping, pcash, phealth, parmour, plevel);
SendClientMessage(playerid, YELLOW, str);
return 1;
}
else return SendClientMessage(playerid, RED, "USAGE: /getinfo <playerid>");
}
else return 0;
}
Please help