Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- main()
- {
- print("\n----------------------------------");
- print("Steal the Area69 Prototype by Face9000");
- print("----------------------------------\n");
- }
- new Text3D:ProtLabel[MAX_VEHICLES];
- new A69Prot;
- new StealingA69Prot[MAX_PLAYERS];
- public OnGameModeInit()
- {
- A69Prot = AddStaticVehicle(428,215.8315,1860.0304,13.2654,1.1393,0,5);
- ProtLabel[A69Prot] = Create3DTextLabel("Area 69 Prototype", 0x00FF00FF, 0.0, 0.0, 0.0, 50.0, 0, 1);
- Attach3DTextLabelToVehicle(ProtLabel[A69Prot],A69Prot, 0.0, 0.0, 0.0);
- return 1;
- }
- public OnGameModeExit()
- {
- Delete3DTextLabel(ProtLabel[A69Prot]);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- StealingA69Prot[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- StealingA69Prot[playerid] = 0;
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(StealingA69Prot[playerid] == 1)
- {
- SendClientMessage(playerid, 0x00BFFFAA, "You failed stealing the Area69 Prototype!");
- RemovePlayerMapIcon(playerid,1);
- GivePlayerMoney(playerid, -500);
- StealingA69Prot[playerid] = 0;
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- new kk[128];
- format(kk, sizeof(kk), "** %s (%d) failed stealing Area69 Prototype!",pname,playerid);
- SendClientMessageToAll(0xC93CCE00,kk);
- SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
- }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if(StealingA69Prot[playerid] == 1)
- {
- RemovePlayerMapIcon(playerid,1);
- SendClientMessage(playerid, 0x00BFFFAA, "You left the Area69 Prototype and the mission is failed!");
- GivePlayerMoney(playerid, -500);
- StealingA69Prot[playerid] = 0;
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- new kk[128];
- format(kk, sizeof(kk), "** %s (%d) failed stealing Area69 Prototype!",pname,playerid);
- SendClientMessageToAll(0xC93CCE00,kk);
- SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vehicleidk;
- if(newstate == PLAYER_STATE_DRIVER)
- {
- vehicleidk = GetPlayerVehicleID(playerid);
- if(vehicleidk == A69Prot)
- {
- if(GetPVarInt(playerid,"StealingTime")>GetTickCount())
- {
- SendClientMessage(playerid,0xFF0000FF,"Please wait before stealing the Area69 Prototype again.");
- RemovePlayerFromVehicle(playerid);
- return 1;
- }
- SetPlayerCheckpoint(playerid, -318.6541,1060.9193,19.7422, 20.0);
- SetPlayerMapIcon(playerid,1, -318.6541,1060.9193,19.7422, 41, 0, MAPICON_GLOBAL);
- GameTextForPlayer(playerid, "~w~You are stealing the ~r~Area69 Prototype! Take it back to the ~r~red ~w~checkpoint! (Follow waypoint icon)", 5000, 3);
- SendClientMessage(playerid,0xAA3333AA,"** Don't exit the prototype UNTIL YOU TOOK IT BACK TO THE CHECKPOINT! (Follow waypoint icon!)");
- SendClientMessage(playerid,0xAA3333AA,"** Enemies will try to kill you so watch yourself!");
- StealingA69Prot[playerid] = 1;
- SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- new kk[140];
- new okk[128];
- format(kk, sizeof(kk), "** %s (%d) is stealing the Area69 Prototype, stop him now at all costs!",pname,playerid);
- format(okk, sizeof(okk), "** You can find him by using /loc %s or /loc %d.",pname,playerid);
- SendClientMessageToAll(0xC93CCE00,kk);
- SendClientMessageToAll(0xC93CCE00,okk);
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(StealingA69Prot[playerid] == 1)
- {
- new playervehicleid = GetPlayerVehicleID(playerid);
- if(playervehicleid == A69Prot)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
- SetVehicleToRespawn(A69Prot);
- GivePlayerMoney(playerid, 15000);
- StealingA69Prot[playerid] = 0;
- GameTextForPlayer(playerid, "You ~r~stole ~w~the ~g~Area69 Prototype ~w~!", 5000, 3);
- new pname[24];
- GetPlayerName(playerid, pname, 24);
- new kk[128];
- format(kk, sizeof(kk), "** %s (%d) successfully stole the Area69 Prototype!",pname,playerid);
- SendClientMessageToAll(0xC93CCE00,kk);
- SetPVarInt(playerid,"StealingTime",GetTickCount()+600000);
- DisablePlayerCheckpoint(playerid);
- RemovePlayerMapIcon(playerid,1);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment