09.10.2013, 16:30
уla galera queria fazer um filtescript de anti hacker
com isto definido etc
Poste original
https://sampforum.blast.hk/showthread.php?tid=396187
com isto definido etc
PHP Code:
public OnPlayerSpawn(playerid)
{
print("Executing spawn...");
if(Logged[playerid] == false) return 1;
GetPlayerPos(playerid, PlayerInfo[playerid][pos_xl], PlayerInfo[playerid][pos_yl], PlayerInfo[playerid][pos_zl]);
SetCameraBehindPlayer(playerid);
Spawn[playerid] = true;
SetPlayerColor(playerid, PlayerColor[playerid]);
if(BattleInfo[playerid][pOnBattle] == 1)
{
BattleInfo[playerid][pDed] +=1;
new lstat[256];
format(lstat, sizeof(lstat), "Twoje lokalne statystyki:\nDrużyna: %d\nPunkty: %d\nŚmierci: %d\nFlagi: %d\nBomby: %d", BattleInfo[playerid][pBattleTeam],BattleInfo[playerid][pPoints],BattleInfo[playerid][pDed],BattleInfo[playerid][pFlag],BattleInfo[playerid][pBomb]);
UpdatePlayer3DTextLabelText(playerid, BattleLocal, COLOR_GREEN, lstat);
if(BattleInfo[playerid][pBattleTeam] == 0)
{
Battle[bAlives] -=1;
}
if(BattleInfo[playerid][pBattleTeam] == 1)
{
Battle[bAlivesA] -=1;
}
if(BattleInfo[playerid][pBattleTeam] == 2)
{
Battle[bAlivesB] -=1;
}
SetPlayerPos(playerid, 1431.5,757.0,16.1);
PreferPlayerBattle(playerid);
return 1;
}
if(PlayerInfo[playerid][aj] != 0)
{
SetPlayerInterior(playerid, Ustawienia[AJ_INT]);
SetPlayerPos(playerid, Ustawienia[AJ_X], Ustawienia[AJ_Y], Ustawienia[AJ_Z]);
SetPlayerVirtualWorld(playerid, playerid);
}
else if(PlayerInfo[playerid][prisontime] > 0)
{
TogglePlayerControllable(playerid, 0);
SetPlayerPos(playerid, 2425.18994141,108.06999969,-72.15000153);
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid,"~r~Wczytywanie obiektow~n~~g~Jestes w wiezieniu",3000,3);
SetTimerEx("ToggleFreeze", 5000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][bw] != 0)
{
PlayerInfo[playerid][health] = 10.0;
SetPlayerHealth(playerid, 10.0);
SetPlayerPos(playerid, PlayerInfo[playerid][pos_x], PlayerInfo[playerid][pos_y], PlayerInfo[playerid][pos_z]+0.3);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pos_vw]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pos_int]);
}
else if(GetPVarInt(playerid, "spawn") == 3) //hotel
{
SetPlayerPos(playerid, Hotels[PlayerInfo[playerid][hoteli]][inside_x], Hotels[PlayerInfo[playerid][hoteli]][inside_y], Hotels[PlayerInfo[playerid][hoteli]][inside_z]);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][player_uid]);
SetPlayerInterior(playerid, Hotels[PlayerInfo[playerid][hoteli]][inside_int]);
hotel[playerid][0] = 1;
hotel[playerid][1] = PlayerInfo[playerid][hoteli];
}
else if(GetPVarInt(playerid, "spawn") == 2) //dom
{
SetPlayerPos(playerid, DoorInfo[PlayerInfo[playerid][dom]][inside_x], DoorInfo[PlayerInfo[playerid][dom]][inside_y], DoorInfo[PlayerInfo[playerid][dom]][inside_z]);
SetPlayerVirtualWorld(playerid, DoorInfo[PlayerInfo[playerid][dom]][inside_vw]);
SetPlayerInterior(playerid, DoorInfo[PlayerInfo[playerid][dom]][inside_int]);
}
else if(GetPVarInt(playerid, "spawn") == 11)
{
SetPlayerPos(playerid, Ustawienia[Spawn1][0], Ustawienia[Spawn1][1], Ustawienia[Spawn1][2]);
SetPlayerFacingAngle(playerid, 90);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
PlayerPlaySound(playerid, 6400, Ustawienia[Spawn1][0], Ustawienia[Spawn1][1], Ustawienia[Spawn1][2]);
}
else if(GetPVarInt(playerid, "spawn") == 1)
{
SendClientMessage(playerid, CLR_GREEN, "Twoja pozycja została przywrуcona!");
SetPlayerPos(playerid, PlayerInfo[playerid][pos_x], PlayerInfo[playerid][pos_y], PlayerInfo[playerid][pos_z]+0.3);
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pos_vw]);
SetPlayerInterior(playerid, PlayerInfo[playerid][pos_int]);
}
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
SetPlayerFightingStyle(playerid, PlayerInfo[playerid][sztukawalki]);
SetPlayerHealth(playerid, PlayerInfo[playerid][health]);
SetPlayerDrunkLevel(playerid, PlayerInfo[playerid][drunklvl]);
Nicki(playerid);
DeletePVar(playerid, "spawn");
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=396187