Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf>
- new checker;
- enum pdatas {
- Float:pPosX,
- Float:pPosY,
- Float:pPosZ,
- Float:pPosA,
- pInCar,
- pCar,
- pSeat,
- pVW,
- pInt,
- pWeapon[13],
- pAmmo[13],
- timers0b
- };
- new pData[MAX_PLAYERS][pdatas];
- AntyDeAMX()
- {
- new amx[][] ={"Unarmed (Fist)","Brass K"};
- new d;
- #emit load.pri d
- #emit stor.pri d
- #pragma unused amx
- }
- public OnFilterScriptInit()
- {
- AntyDeAMX();
- print("--- Anty s0beit checker by radeh/Mr.R || CMD:/chech [id] |[ALPHA] --- ");
- return 1;
- }
- CMD:check(playerid, params[]){
- new pID;
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"Komenda tylko dla administratora!");
- if(sscanf(params, "i", pID)) return SendClientMessage(playerid, -1,"/check [id]");
- if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1,"Gracz nie jest podlaczony");
- checker = playerid;
- if(!IsPlayerInAnyVehicle(pID)){
- GetPlayerPos(pID, pData[pID][pPosX],pData[pID][pPosY],pData[pID][pPosZ]);
- GetPlayerFacingAngle(pID, pData[pID][pPosA]);
- pData[pID][pVW] = GetPlayerVirtualWorld(pID);
- pData[pID][pInt] = GetPlayerInterior(pID);
- pData[pID][pInCar] = 0;
- for (new i = 0; i <= 12; i++)
- {
- GetPlayerWeaponData(pID, i, pData[pID][pWeapon][i] ,pData[pID][pAmmo][i] );
- }
- }else{
- GetPlayerPos(pID, pData[pID][pPosX],pData[pID][pPosY],pData[pID][pPosZ]);
- GetPlayerFacingAngle(pID, pData[pID][pPosA]);
- pData[pID][pVW] = GetPlayerVirtualWorld(pID);
- pData[pID][pInt] = GetPlayerInterior(pID);
- pData[pID][pCar] = GetPlayerVehicleID(pID);
- pData[pID][pSeat] = GetPlayerVehicleSeat(pID);
- pData[pID][pInCar] = 1;
- RemovePlayerFromVehicle(pID);
- for (new i = 0; i <= 12; i++)
- {
- GetPlayerWeaponData(pID, i, pData[pID][pWeapon][i] ,pData[pID][pAmmo][i] );
- }
- }
- CheckS0beit(pID);
- return 1;
- }
- public OnPlayerDisconnect(playerid){
- KillTimer(pData[playerid][timers0b]);
- return 1;
- }
- forward AntiS0bek(pID);
- public AntiS0bek(pID){
- new dt[2];
- GetPlayerWeaponData(pID, WEAPON_GOLFCLUB-1, dt[0], dt[1]);
- if(dt[0] == WEAPON_GOLFCLUB){
- new strr[64], name[MAX_PLAYER_NAME];
- GetPlayerName(pID, name, MAX_PLAYER_NAME);
- format(strr,sizeof(strr),"Gracz %s(%d) uzywa s0beita i zostanie wyrzucony!",name,pID);
- SendClientMessage(checker, -1, strr);
- Kick(pID);
- }else{
- new strr[64], name[MAX_PLAYER_NAME];
- GetPlayerName(pID, name, MAX_PLAYER_NAME);
- format(strr,sizeof(strr),"Gracz %s(%d) nie uzywa s0beita!",name,pID);
- SendClientMessage(checker, -1, strr);
- if(pData[pID][pInCar] == 0){
- SetPlayerVirtualWorld(pID, pData[pID][pVW]);
- SetPlayerInterior(pID, pData[pID][pInt]);
- SetPlayerPos(pID, pData[pID][pPosX],pData[pID][pPosY],pData[pID][pPosZ]);
- SetPlayerFacingAngle(pID, pData[pID][pPosA]);
- ResetPlayerWeapons(pID);
- for (new i = 0; i <= 12; i++)
- {
- GivePlayerWeapon(pID,pData[pID][pWeapon][i],pData[pID][pAmmo][i]);
- }
- }else{
- SetPlayerVirtualWorld(pID, pData[pID][pVW]);
- SetPlayerInterior(pID, pData[pID][pInt]);
- //SetPlayerPos(pID, pData[pID][pPosX],pData[pID][pPosY],pData[pID][pPosZ]);
- //SetPlayerFacingAngle(pID, pData[pID][pPosA]);
- PutPlayerInVehicle(pID, pData[pID][pCar], pData[pID][pSeat]);
- ResetPlayerWeapons(pID);
- for (new i = 0; i <= 12; i++)
- {
- GivePlayerWeapon(pID,pData[pID][pWeapon][i],pData[pID][pAmmo][i]);
- }
- }
- }
- checker = -1;
- return 1;
- }
- stock CheckS0beit(playerid){
- new c[MAX_PLAYERS];
- SetPlayerVirtualWorld(playerid, 100+playerid);
- ResetPlayerWeapons(playerid);
- c[playerid] = CreateVehicle(457, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
- SetVehicleVirtualWorld(c[playerid], 100+playerid);
- PutPlayerInVehicle(playerid, c[playerid], 0);
- RemovePlayerFromVehicle(playerid);
- DestroyVehicle(c[playerid]);
- SetPlayerPos(playerid, 0.0, 0.0, 10000.0);
- pData[playerid][timers0b] = SetTimerEx("AntiS0bek", 1000, false, "i", playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement