Гость Гость
| Тема: Анти-Телепорт по карте собейтом Пн 9 Сен - 22:12 | |
| PHP код: - Код:
-
enum AC_STRUCT_INFO { Float:LastOnFootPosition[3], checkmaptp, maptplastclick, Float:maptp[3] }
new acstruct[MAX_PLAYERS][AC_STRUCT_INFO]; После в public OnPlayerUpdate(playerid) - Код:
-
PHP код: if(PlayerInfo[playerid][pAdmin] <= 1) { if(acstruct[playerid][checkmaptp] == 1) { new Float:dis = GetPlayerDistanceFromPoint(playerid, acstruct[playerid][maptp][0], acstruct[playerid][maptp][1], acstruct[playerid][maptp][2]); new plname[MAX_PLAYER_NAME], string[256]; if(dis < 5.0) { new Float:disd = GetPlayerDistanceFromPoint(playerid, acstruct[playerid][LastOnFootPosition][0], acstruct[playerid][LastOnFootPosition][1], acstruct[playerid][LastOnFootPosition][2]); if(disd > 25.0) { SendClientMessage(playerid,COLOR_LIGHTRED,"{FFFAFA}* {00FF00}[Античит: 3] {FFFAFA}: {FF0000}Вы были кикнуты за Телепортацию читом по карте!"); SendClientMessage(playerid,COLOR_LIGHTRED,"{FFFAFA}* {FF0000}Предупреждаем! Использование чит-программ карается баном!"); GetPlayerName(playerid, plname, sizeof(plname)); format(string,sizeof(string),"{FFFAFA}* [Античит: 3] {FFFAFA}: %s был кикнут из-за использование чита (ТП по карте)",plname); SendAdminMessage(COLOR_LIGHTRED, string); Kick(playerid); } } acstruct[playerid][checkmaptp] = false; } } GetPlayerPos(playerid, acstruct[playerid][LastOnFootPosition][0], acstruct[playerid][LastOnFootPosition][1], acstruct[playerid][LastOnFootPosition][2]); NoRoof(playerid); Ко всем forward : - Код:
-
PHP код: forward NoRoof(playerid); И куда-нибудь в конец мода: PHP код: - Код:
-
public NoRoof(playerid) { new carid = GetPlayerSurfingVehicleID(playerid); if(carid != INVALID_VEHICLE_ID ) { new cm=GetVehicleModel(carid); switch(cm) { case 430,446,452,453,454,472,473,484,493,595:{return true;} default:{} } new Float:slx, Float:sly, Float:slz; GetPlayerPos(playerid, slx, sly, slz); SetPlayerPos(playerid, slx, sly, slz+2.5); } return true; } |
|