Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new gBomb[MAX_PLAYERS]; //Save Information about how many Bombs do that player have
- #define COLOR_AGENT 0x0015FFFF //Just Color
- #define COLOR_TERRORIST 0xD8000000 //Just Color
- #define COLOR_SYSTEM 0xFFF16B6B //Just Color
- main()
- {
- print("\n----------------------------------");
- print("Bomb It Up - Source - VirSpector Server");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("BoOm It Up By ViRsPeCtOr SeRvEr");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerPrivmsg(playerid, recieverid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- // THIS ONE IS THE SOURCE
- if (strcmp("/buybomb", cmdtext, true) == 0)
- {
- if(GetPlayerScore(playerid) > 1){
- gBomb[playerid] += 1;
- SetPlayerScore(playerid, GetPlayerScore(playerid) - 2);
- SendClientMessage(playerid, COLOR_TERRORIST, "<~> You lost 2 scores for buying a bomb <~>");
- SendClientMessage(playerid, COLOR_SYSTEM, "<~> Type /usebomb to use the bomb <~>");
- }
- else
- {
- SendClientMessage(playerid, COLOR_AGENT, "<~> 1 Bomb Cost 2 scores, collect more scores if you want to buy a bomb! <~>");
- }
- return 1;
- }
- if (strcmp("/usebomb", cmdtext, true) == 0)
- {
- new Float:x, Float:y, Float:z;
- if(gBomb[playerid] > 0)
- {
- GetPlayerPos(playerid,x,y,z);
- AddStaticPickup(1225, 11, x, y, z);
- SendClientMessage(playerid, COLOR_SYSTEM, "<~> You placed an Explosive Barrel <~>");
- gBomb[playerid] -= 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_AGENT, "<~> You don't have any bomb! Use /buybomb to buy a bomb (Cost: 2 Scores Each Bomb) <~>");
- }
- return 1;
- }
- return 0;
- // END OF THE SOURCE
- }
- public OnPlayerInfoChange(playerid)
- {
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment