28.09.2013, 18:43
Hi anyone can please help me to make this dialog? Also add getplayerinterior and getplayervirtualworld
Also this one
THANK YOU!
Код:
CMD:info(playerid,params[]) { new id, WeapName[32], slot, weap, ammo, model , Float:Health , Float:Armour,Float:Vheath,Count = 0; if(sscanf(params, "u",id)) return SendClientMessage(playerid, yellow, "Usage: /Info <Part of Nick/Player ID>"); if(IsPlayerConnected(id)) { GetPlayerArmour(id,Armour); GetPlayerHealth(id,Health); CommandToAdmins(playerid,"info"); format(Jstring, sizeof(Jstring), "__Informations for: %s(%d)__",GetName(id) ,id); SendClientMessage(playerid, green, Jstring); if(IsPlayerInAnyVehicle(id)) { GetVehicleHealth(GetPlayerVehicleID(id), Vheath); model = GetVehicleModel(GetPlayerVehicleID(id)); format(Jstring, sizeof(Jstring), "Health: %0.1f | Armour: %0.1f | Ratio: %0.2f | Ping: %d | Current vehicle: %s(Model: %d) | Vehicle health: %0.1f", Health , Armour, Float:pInfo[id][Kills]/Float:pInfo[id][Deaths],GetPlayerPing(id),VehicleNames[model-400],model,Vheath); } else format(Jstring, sizeof(Jstring), "Health: %0.1f | Armour: %0.1f | Kills: %d | Deaths: %d |Ratio: %0.2f | Ping: %d", Health , Armour, pInfo[id][Kills],pInfo[id][Deaths], Float:pInfo[id][Kills]/Float:pInfo[id][Deaths],GetPlayerPing(id)); SendClientMessage(playerid, orange, Jstring); for(slot = 0; slot < 13; slot++) { GetPlayerWeaponData(id, slot, weap, ammo); if( ammo != 0 && weap != 0) Count++; } if(Count == 0) { format(Jstring, sizeof(Jstring), "%s has no weapons!",GetName(id)); return SendClientMessage(playerid,green,Jstring); } else { format(Jstring, sizeof(Jstring), "__%s's weapons__",GetName(id)); SendClientMessage(playerid,red,Jstring); } if(Count >= 1) { for (slot = 0; slot < 13; slot++) { GetPlayerWeaponData(id, slot, weap, ammo); if( ammo != 0 && weap != 0) { GetWeaponName(weap, WeapName, sizeof(WeapName)); format(Jstring,sizeof(Jstring),"%s (%d)", WeapName, ammo); SendClientMessage(playerid, orange, Jstring); } } } return 1; } else return ShowMessage(playerid, red, 2); }
Код:
CMD:getip(playerid,params[]) { if(pInfo[playerid][pLevel] >= 2) { new id,ip[16]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /getip <Player ID/Part of Nick>"); if(IsPlayerConnected(id)) { CommandToAdmins(playerid,"getip"); GetPlayerIp(id,ip,16); format(Jstring,sizeof(Jstring),"Player Name: %s(ID: %d) | IP: %s", GetName(id),id, ip); SendClientMessage(playerid,green,Jstring); return 1; } else return ShowMessage(playerid, red, 2); } else return ShowMessage(playerid, red, 1); }