Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ============================================================================
- // Gaudynių sistema
- // Kreditų prašau nekeisti, pakeitę kreditus šio fs kūrėju netapsite!
- // Sukurta pagal MantasPwn ( Mantas_Life )
- // Versija: v0.2
- =============================================================================*/
- #define FILTERSCRIPT
- #include <a_samp>
- #define GREEN 0x33AA33AA
- #define RED 0xAA3333AA
- #define YELLOW 0xFFFF00AA
- #define CWHITE 0xFFFFFFAA
- #define BLUE 0x0000BBAA
- #define ORANGE 0xFF9900AA
- #define RED 0xAA3333AA
- enum info{
- bool:Gaudytojas
- };
- new pInfo[MAX_PLAYERS][info];
- new bool:Gaudo;
- new masina; // masina
- //Los santos random spawnai
- new Float:RandomSpawn[][4] =
- {
- {1302.3599,-930.2845,39.0481,265.9452},
- {1302.3599,-930.2845,39.0481,265.9452},
- {1463.2319,-954.8225,35.7562,256.4555},
- {1849.1582,-1012.7867,35.7567,260.1097},
- {2151.7361,-1109.5553,25.0283,228.5781},
- {2165.5667,-1295.3243,23.4452,173.2844},
- {2110.2405,-1456.5002,23.4538,180.5320},
- {2091.1726,-1726.4398,13.1830,155.7466},
- {1912.8125,-1793.9650,13.0910,100.9598},
- {1696.0015,-1869.0270,13.1748,108.6290},
- {1346.2948,-1861.2217,13.0069,74.9321},
- {1009.1754,-1810.9103,13.6851,63.1777},
- {544.4791,-1717.0066,12.5298,83.1754},
- {155.3508,-1560.8696,10.8251,34.2408},
- {431.7661,-1323.6981,14.5209,301.8467},
- {681.0300,-1221.5962,15.7292,299.1794},
- {1052.2552,-1151.6973,23.3098,267.8715},
- {1207.9073,-1324.9266,13.0225,194.9511},
- {1248.9963,-1432.3840,13.1818,285.2023},
- {1318.2496,-1528.3755,13.0078,165.9852},
- {1511.9880,-1610.7473,13.6710,254.5193}
- };
- //************************
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Gaudynes by MantasPwn ( Mantas_Life )");
- print("--------------------------------------\n");
- masina = 415; //INJECTION
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Gaudynes by MantasPwn ( Mantas_Life )");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- 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 OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/kasgaudo", cmdtext, true, 10) == 0)
- {
- if(Gaudo == true){
- SendClientMessage(playerid,-1, "* Gaudoytojas jau yra!");
- }else{
- /*new string[120], Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Name, sizeof(Name));
- pInfo[playerid][Gaudytojas] = true;
- format(string, sizeof(string), "* Zaidejas %s gaudo!", Name);
- SendClientMessageToAll(-1, string);
- for(new i; i < MAX_PLAYERS; i++){
- Gaudo = true;
- }*/
- new onlineids[MAX_PLAYERS]; // to store all online playerids
- new playersonline; // to store the amount of current online players
- new pname[80]; // to store the chosen player's name
- for(new i=0; i<MAX_PLAYERS; i++) // loop through max amount of players (hopefully redefined from default!)
- {
- if(IsPlayerConnected(i)) // check to see if current id in the loop is connected
- {
- onlineids[playersonline] = i; // store the current id into the onlineids variable
- playersonline++; // increase the playersonline by 1
- Gaudo = true;
- pInfo[i][Gaudytojas] = true;
- }
- }
- GetPlayerName(onlineids[random(playersonline)], pname, sizeof(pname)); // use the random function to randomly select a store online id
- format(pname, sizeof(pname), "* Pirmasis gaudytojas yra zaidejas %s", pname);
- SendClientMessageToAll(GREEN, pname);
- }
- return 1;
- }
- if (strcmp("/jungtis", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, GREEN, "* Prisijungei į žaidimą!");
- new rand = random(sizeof(RandomSpawn));
- SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
- new car = CreateVehicle(masina, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2],RandomSpawn[rand][3], -1, -1, false);
- PutPlayerInVehicle(playerid, car, 0);
- return 1;
- }
- return 0;
- }
- 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 OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(Gaudo == true){
- if(pInfo[playerid][Gaudytojas] == true){
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
- for(new i = 0; i < MAX_PLAYERS; i++){
- if(IsPlayerConnected(i) || IsPlayerConnected(playerid)){
- if(i == playerid)continue;
- new Float:Pos[3], string1[60], string2[60], Name1[24], Name2[24], msg[80];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- if(IsPlayerInRangeOfPoint(i, 5, Pos[0], Pos[1], Pos[2])){
- GetPlayerName(playerid, Name2, sizeof(Name2));
- GetPlayerName(i, Name1, sizeof(Name1));
- format(msg,sizeof(msg), "* Gaudytojas %s pagavo zaideja %s, dabar gaudo jis!", Name2, Name1);
- format(string1, sizeof(string1), "Pagavai zaideja %s, dabar gaudo jis!", Name1);
- SendClientMessage(playerid, YELLOW, string1);
- format(string2, sizeof(string2), "Tave pagavo zaidejas %s, dabar gaudai tu!", Name2);
- SendClientMessage(i, RED, string2);
- pInfo[playerid][Gaudytojas] = false;
- pInfo[i][Gaudytojas] = true;
- Gaudo = false;
- SetTimer("Gaudynes", 3000, false);
- SendClientMessageToAll(GREEN, msg);
- }
- }
- }
- }
- }
- }
- new vehicle, Float:hp;
- vehicle = GetPlayerVehicleID(playerid);
- GetVehicleHealth(vehicle, hp);
- if(hp < 700){
- SetVehicleHealth(vehicle, 1000);
- }
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- forward Gaudynes(playerid);
- public Gaudynes(playerid){
- Gaudo = true;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement