1Grant1 |
Дата: Пятница, 06.03.2015, 14:38 | Сообщение # 1
|
Batka
Сообщений: 73
Статус: Offline
|
Приветствую.Хочу вам представить сис-му GM-Test`a.Итак,начнем. Для начала добавьте ко всем new: Код new Float:GMHP[MAX_PLAYERS][2]; new Float:VEHHP[MAX_PLAYERS][2]; new Float:GMARMOUR[MAX_PLAYERS][1]; И в форварды: Код forward GETHP(playerid);
1.В public OnPlayerCommandText: Код if(strcmp(cmd, "/gm", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 2 || dostup[playerid] == 0) return true; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, " Используйте: /gm [id]"); if(!IsPlayerConnected(giveplayerid)) return true; GetPlayerHealth(giveplayerid,GMHP[giveplayerid][0]); GetVehicleHealth(GetPlayerVehicleID(giveplayerid),VEHHP[giveplayerid][0]); GetPlayerArmour(giveplayerid, GMARMOUR[giveplayerid][0]); SetPlayerArmour(giveplayerid, 0); SetPlayerHealthAC(giveplayerid, 100.0); player_NoCheckTimeVeh[giveplayerid] = 3; SetVehicleHealth(GetPlayerVehicleID(giveplayerid),10000.0); SetTimerEx("GETHP",1000,false,"i",giveplayerid); new Float:boomx, Float:boomy, Float:boomz; GetPlayerPos(giveplayerid,boomx, boomy, boomz); CreateExplosion(boomx, boomy , boomz+8, 5, 2); return true; } На YCMD: Код YCMD:gm(playerid, params[], help) { if(!PlayerInfo[playerid][pLogin]) return SendClientMessage(playerid,COLOR_WHITE,"Вы не авторизованы!"); if(PlayerInfo[playerid][pAdmin] < 2 || dostup[playerid] == 0) return true; if(sscanf(params, "u",params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /gm [id]"); if(!IsPlayerConnected(params[0])) return true; GetPlayerHealth(params[0],GMHP[params[0]][0]); GetVehicleHealth(GetPlayerVehicleID(params[0]),VEHHP[params[0]][0]); GetPlayerArmour(params[0], GMARMOUR[params[0]][0]); SetPlayerArmour(params[0], 0); SetPlayerHealthAC(params[0], 100.0); player_NoCheckTimeVeh[params[0]] = 3; SetVehicleHealth(GetPlayerVehicleID(params[0]),10000.0); SetTimerEx("GETHP",1000,false,"i",params[0]); new Float:boomx, Float:boomy, Float:boomz; GetPlayerPos(params[0],boomx, boomy, boomz); CreateExplosion(boomx, boomy , boomz+8, 5, 2); return true; } 2.Ко всем стокам и пабликам: Код public GETHP(playerid) { GetPlayerHealth(playerid,GMHP[playerid][1]); GetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][1]); new stringer[80]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); if(!IsPlayerInAnyVehicle(playerid)) { if(GMHP[playerid][1] >= 100.0) { format(stringer, sizeof(stringer), "{ff0000}[ERROR 003/ANTI-GM]: {bbbbbb}%s[%i] использует гм/клео скрипты", sendername,playerid); ABroadCast(COLOR_REDD,stringer,2); SetPlayerHealthAC(playerid, GMHP[playerid][0]); SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]); return true; } else { format(stringer, sizeof(stringer), "{34c924}[ANTI-GM] {bbbbbb}%s[%d] не использует гм/клео скриптты", sendername,playerid); ABroadCast(COLOR_YELLOW,stringer,2); SetPlayerHealthAC(playerid, GMHP[playerid][0]); SetPlayerArmourAC(playerid, GMARMOUR[playerid][0]); return true; } } else { if(VEHHP[playerid][1] >= 9999.0) { format(stringer, sizeof(stringer), "{ff0000}[ERROR 004/ANTI-GM]: {bbbbbb}%s[%i] использует гм/клео скрипты", sendername,playerid); ABroadCast(COLOR_REDD,stringer,2); SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]); return true; } else { format(stringer, sizeof(stringer), "{34c924}[ANTI-GM] {bbbbbb}%s[%i] не использует гм/клео скриптты", sendername,playerid); ABroadCast(COLOR_YELLOW,stringer,2); SetVehicleHealth(GetPlayerVehicleID(playerid),VEHHP[playerid][0]); return true; } } } Если есть такая сис-ма,напишите,тему удалю.
EricW ПРЕВОСХОДИТ БОГОВ,убейте же его наконец!!
Сообщение отредактировал 1Grant1 - Пятница, 06.03.2015, 14:43 |
|
|
|