Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- new bomb[MAX_VEHICLES];
- new bombegem[MAX_PLAYERS];
- new vehlo[MAX_PLAYERS];
- #define ROT 0xFF0000FF
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- AntiDeAMX();
- print("\n--------------------------------------");
- print(" Special Car Bomb");
- print("--------------------------------------\n");
- return 1;
- }
- #else
- #endif
- stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/veh", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,ROT,"You must enter a Vehicle!");
- {
- if(bomb[GetPlayerVehicleID(playerid)] != 0) return SendClientMessage(playerid,ROT,"In this Car is Allready a Bomb!");
- {
- SendClientMessage(playerid,ROT,"Bomb created!");
- bombegem[playerid] = 1;
- }
- }
- return 1;
- }
- if(strcmp("/car", cmdtext, true ,10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- CreateVehicle(555,x,y,z,0,1,1,100);
- }
- }
- return 0;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(bombegem[playerid] == 1)
- {
- vehlo[playerid] = GetPlayerVehicleID(playerid);
- SetTimer("Warte",6000,false);
- bombegem[playerid] = 0;
- SendClientMessage(playerid,ROT,"Bomb would be activated in 6 Seconds!");
- }
- if(bomb[vehicleid] == 1)
- {
- new Float:x,Float:y,Float:z;
- GetVehiclePos(vehicleid,x,y,z);
- CreateExplosion(x,y,z,5,10.0);
- SetPlayerHealth(playerid,0);
- SetPlayerArmour(playerid,0);
- GameTextForPlayer(playerid, "~r~Any Player Has Fucked You!", 5000, 2);
- bomb[vehicleid] = 0;
- }
- return 1;
- }
- forward Bombecount(playerid);
- public Bombecount(playerid)
- {
- new Float:x,Float:y,Float:z;
- GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
- CreateExplosion(x,y,z,5,10.0);
- SetPlayerHealth(playerid,0);
- SetPlayerArmour(playerid,0);
- GameTextForPlayer(playerid, "~r~Any Player Has Fucked You!", 5000, 2);
- bomb[GetPlayerVehicleID(playerid)] = 0;
- return 1;
- }
- forward Warte(playerid);
- public Warte(playerid)
- {
- bomb[vehlo[playerid]] = 1;
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(bomb[vehicleid] == 1)
- {
- GameTextForPlayer(playerid,"~r~Worning: This car carrying a bomb",2,1);
- SendClientMessage(playerid,ROT,"Worning: This car carrying a bomb");
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(IsPlayerInAnyVehicle(playerid) && bomb[GetPlayerVehicleID(playerid)] == 1)
- {
- if(newkeys & KEY_HANDBRAKE)
- {
- new Float:x,Float:y,Float:z;
- GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
- CreateExplosion(x,y,z,5,10.0);
- SetPlayerHealth(playerid,0);
- SetPlayerArmour(playerid,0);
- GameTextForPlayer(playerid, "~r~Any Player Has Fucked You!", 5000, 2);
- bomb[GetPlayerVehicleID(playerid)] = 0;
- }
- }
- return 1;
- }
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement