22.08.2015, 15:03
Seems to be a decent administration system. Good job dude!
Gammix you forgot something like this:
PHP код:
|
GAdminv(2 - 2.3.2) - Source files GITHUB - .pwn and .inc GAdminv2_3.7z - Full package (please do update the plugins and includes as time passes) Solidfiles
if(time > 5*60 || time < 10) return SendClientMessage(playerid, COLOR_RED, "HATA:"WHITE" Hapis sьresi 10 - 300 dakika arası olmalıdır."); |
CMD:hapiseat(playerid, params[]) { //check if the player is a admin LevelCheck(playerid, 2); new target, time, reason[128]; if(sscanf(params, "uI(60)S(No reason specified)[128]", target, time, reason)) return SendClientMessage(playerid, COLOR_THISTLE, "KULLANIM: "WHITE"/hapiseat [isim/ID] [dakika] [sebep]"); if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_RED, "HATA:"WHITE" Geзersiz oyuncu."); if(GetPlayerGAdminLevel(playerid) < GetPlayerGAdminLevel(target)) return SendClientMessage(playerid, COLOR_RED, "HATA: Kendinden yьksek yцneticiye bu komutu kullanamazsın."); if(time > 5*60 || time < 10) return SendClientMessage(playerid, COLOR_RED, "HATA:"WHITE" Hapis sьresi 10 - 300 dakika arası olmalıdır."); if(target == playerid) return SendClientMessage(playerid, COLOR_RED, "HATA:"WHITE" Kendini hapise atamazsın."); if(GetPVarType(target, "GAdmin_Jailed") != PLAYER_VARTYPE_NONE) return SendClientMessage(playerid, COLOR_RED, "HATA:"WHITE" Oyuncu zaten hapiste."); SetPVarInt(target, "GAdmin_Jailed", 1); gUser[target][u_jailtime] = time; JailPlayer(target); PlayerPlaySound(target, 1057, 0.0, 0.0, 0.0); PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0); new string[144]; format(string, sizeof(string), "SUNUCU:"WHITE" %s[%i] yцnetici %s[%i] tarafından %i dakika hapise atıldı, sebep: %s]", ReturnPlayerName(target), target, ReturnPlayerName(playerid), playerid, time, reason); SendClientMessageToAll(COLOR_SAMP_BLUE, string); format(string, sizeof(string), "~b~~h~~h~~h~Hapisten cikmana %i dakika var", time); GameTextForPlayer(target, string, 5000, 3); return 1; }