pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <sscanf2>
#include <zcmd>
#include <foreach>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" [WAR] [SAF] practice server");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
//BF Injection
AddStaticVehicleEx(424,2040.09997559,1340.90002441,10.50000000,0.00000000,-1,-1,15);
//Hotring
AddStaticVehicleEx(494,2040.19921875,1350.69921875,10.60000038,0.00000000,-1,-1,15);
//Vortex
AddStaticVehicleEx(539,2040.09997559,1358.50000000,10.30000019,0.00000000,-1,-1,15);
//PCJ-600
AddStaticVehicleEx(461,2040.00000000,1332.50000000,10.30000019,0.00000000,-1,-1,15);
//NRG-500
AddStaticVehicleEx(522,2025.30004883,1368.90002441,10.50000000,268.00000000,-1,-1,15);
//NRG-500
AddStaticVehicleEx(522,2025.40002441,1370.80004883,10.50000000,272.00000000,-1,-1,15);
//NRG-500
AddStaticVehicleEx(522,2025.50000000,1372.40002441,10.50000000,270.00000000,-1,-1,15);
//NRG-500
AddStaticVehicleEx(522,2025.69995117,1373.80004883,10.50000000,272.00000000,-1,-1,15);
//Hydra
AddStaticVehicleEx(520,1581.69995117,1439.50000000,11.30000019,92.00000000,-1,-1,15);
//Hydra
AddStaticVehicleEx(520,1580.50000000,1448.40002441,11.30000019,95.99987793,-1,-1,15);
//Hydra
AddStaticVehicleEx(520,1580.09997559,1457.59997559,11.30000019,96.00000000,-1,-1,15);
//Hydra
AddStaticVehicleEx(520,1584.19995117,1428.80004883,10.50000000,94.00000000,-1,-1,15);
//Rustler
AddStaticVehicleEx(476,1487.90002441,1835.90002441,12.00000000,180.00000000,-1,-1,15);
//Rustler
AddStaticVehicleEx(476,1473.90002441,1835.50000000,12.00000000,175.99993896,-1,-1,15);
//Stunt
AddStaticVehicleEx(513,1326.19995117,1622.30004883,11.60000038,268.00000000,-1,-1,15);
//Stunt
AddStaticVehicleEx(513,1326.40002441,1609.69995117,11.60000038,272.00000000,-1,-1,15);
//Dodo
AddStaticVehicleEx(593,1326.69995117,1593.80004883,11.39999962,274.00000000,-1,-1,15);
//Dodo
AddStaticVehicleEx(593,1327.59997559,1580.19995117,10.89999962,268.00000000,-1,-1,15);
//Infernus
AddStaticVehicleEx(411,-1478.30004883,2653.00000000,55.59999847,0.00000000,-1,-1,15);
//Super GT
AddStaticVehicleEx(506,-1474.90002441,2652.50000000,55.59999847,0.00000000,-1,-1,15);
//Jester
AddStaticVehicleEx(559,-1471.69995117,2651.69995117,55.59999847,0.00000000,-1,-1,15);
//Bullet
AddStaticVehicleEx(541,-1487.59997559,2640.10009766,55.50000000,0.00000000,-1,-1,15);
//Hunter
AddStaticVehicleEx(425,-1477.69995117,2690.89990234,56.90000153,0.00000000,-1,-1,15);
//Maverick
AddStaticVehicleEx(487,-1321.40002441,2511.60009766,92.80000305,0.00000000,-1,-1,15);
//Hermes
AddStaticVehicleEx(474,-1308.90002441,2487.89990234,87.09999847,270.00000000,-1,-1,15);
//Slamvan
AddStaticVehicleEx(535,-1303.80004883,2493.19995117,87.00000000,0.00000000,-1,-1,15);
//Buffalo
AddStaticVehicleEx(402,-1310.40002441,2470.10009766,87.40000153,0.00000000,-1,-1,15);
//Buffalo
AddStaticVehicleEx(402,-1306.59997559,2470.39990234,87.40000153,0.00000000,-1,-1,15);
//Infernus
AddStaticVehicleEx(411,-1315.00000000,2469.50000000,86.90000153,0.00000000,-1,-1,15);
//Infernus
AddStaticVehicleEx(411,-1319.30004883,2469.50000000,86.80000305,0.00000000,-1,-1,15);
//Cheetah
AddStaticVehicleEx(415,-1303.00000000,2470.30004883,87.30000305,0.00000000,-1,-1,15);
//Cheetah
AddStaticVehicleEx(415,-1299.59997559,2469.89990234,87.30000305,0.00000000,-1,-1,15);
//object(imnrmpy1_las2) (1)
CreateObject(5169,695.29998779,-3100.50000000,4.30000019,0.00000000,0.00000000,0.00000000);
//object(gen_doorint01) (2)
CreateObject(1491,2018.59997559,1342.59997559,9.89999962,0.00000000,0.00000000,270.00000000);
//object(gen_doorint04) (1)
CreateObject(1502,2018.40002441,1344.90002441,9.89999962,0.00000000,0.00000000,270.00000000);
//object(veg_palmkb1) (1)
CreateObject(625,2009.40002441,1333.80004883,19.60000038,0.00000000,0.00000000,0.00000000);
//object(veg_palmkb1) (2)
CreateObject(625,2021.30004883,1340.09997559,9.80000019,0.00000000,0.00000000,0.00000000);
//object(veg_palmkb1) (3)
CreateObject(625,2021.00000000,1345.90002441,9.80000019,0.00000000,0.00000000,0.00000000);
//object(samsite_sfxrf) (1)
CreateObject(3884,2019.59997559,1338.19995117,9.80000019,0.00000000,0.00000000,274.00000000);
//object(samsite_sfxrf) (2)
CreateObject(3884,2018.90002441,1347.90002441,9.80000019,0.00000000,0.00000000,272.00000000);
//object(minigun_base) (1)
CreateObject(2985,2024.59997559,1337.30004883,9.80000019,0.00000000,0.00000000,92.00000000);
//object(minigun_base) (2)
CreateObject(2985,2024.80004883,1348.40002441,9.80000019,0.00000000,0.00000000,269.99996948);
//object(a51_spottower) (1)
CreateObject(3279,2017.09997559,1334.19995117,8.60000038,0.00000000,0.00000000,0.00000000);
//object(a51_spottower) (2)
CreateObject(3279,2016.59997559,1354.40002441,8.60000038,0.00000000,0.00000000,0.00000000);
//object(a51_sdsk_1_) (1)
CreateObject(3397,-1476.40002441,2633.69995117,57.90000153,0.00000000,0.00000000,0.00000000);
//object(missile_02_sfxr) (1)
CreateObject(3787,-1481.59997559,2611.80004883,58.29999924,0.00000000,0.00000000,0.00000000);
//object(missile_11_sfxr) (1)
CreateObject(3797,-1476.40002441,2639.50000000,59.59999847,0.00000000,0.00000000,269.99996948);
//object(kmilitary_crate) (1)
CreateObject(2977,-1479.40002441,2612.19995117,57.79999924,0.00000000,0.00000000,0.00000000);
//object(gen_doorint04) (2)
CreateObject(1502,-1481.80004883,2643.39990234,57.79999924,0.00000000,0.00000000,181.99996948);
//object(gen_doorint04) (3)
CreateObject(1502,-1484.80004883,2643.30004883,57.79999924,0.00000000,0.00000000,0.00000000);
//object(kmb_keypad) (1)
CreateObject(2922,-1482.00000000,2643.69995117,59.09999847,0.00000000,0.00000000,0.00000000);
//object(1)
CreateObject(367,-1484.30004883,2643.69995117,59.40000153,0.00000000,0.00000000,64.00000000);
//object(des_ruin3_) (1)
CreateObject(3364,-1287.50000000,2476.60009766,86.19999695,0.00000000,0.00000000,0.00000000);
//object(med_couch_1) (1)
CreateObject(1766,-1476.69995117,2628.69995117,57.79999924,0.00000000,0.00000000,268.00000000);
//object(cj_police_counter2) (2)
CreateObject(2606,-1481.19995117,2643.19995117,59.79999924,0.00000000,0.00000000,0.00000000);
//object(polce_shelf) (1)
CreateObject(2608,-1477.90002441,2641.60009766,58.50000000,0.00000000,0.00000000,0.00000000);
//object(cj_police_counter2) (3)
CreateObject(2606,-1481.19995117,2643.19995117,59.40000153,0.00000000,0.00000000,0.00000000);
//object(cj_police_counter2) (4)
CreateObject(2606,-1481.19995117,2643.19995117,58.90000153,0.00000000,0.00000000,0.00000000);
//object(cj_police_counter2) (5)
CreateObject(2606,-1481.19995117,2643.19995117,58.50000000,0.00000000,0.00000000,0.00000000);
//object(cj_police_counter2) (6)
CreateObject(2606,-1481.19995117,2643.19995117,58.09999847,0.00000000,0.00000000,0.00000000);
SetGameModeText("[WAR] [SAF] Server");
AddPlayerClass(1, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(29, -1322.0654, 2497.6106, 87.0469, 190.4696, 0, 0, 0, 0, 0, 0);
AddPlayerClass(47, -1477.2655,2623.8315,58.7813,93.9888,0,0,0,0,0,0);
AddPlayerClass(57, -1322.0654, 2497.6106, 87.0469, 190.4696, 0, 0, 0, 0, 0, 0);
AddPlayerClass(60, -1477.2655,2623.8315,58.7813,93.9888,0,0,0,0,0,0);
AddPlayerClass(70, -1322.0654, 2497.6106, 87.0469, 190.4696, 0, 0, 0, 0, 0, 0);
print("my gamemode");
ConnectNPC("Justin_Bieber","at400_ls");
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 OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
}
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid,25000);
SetPlayerFightingStyle(playerid, 0);
SendClientMessage(playerid, 0xFFFFFFF, " Welcome to your spawn area. You have been given 25000$");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid, 0xAAAAAAAA, " You died. Lost 2500$ for death ");
GivePlayerMoney(playerid, -2500);
// Adds 2 to this killer's score.
if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
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("/mycommand", cmdtext, true, 10) == 0) {
// Do something here
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)
{
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;
}
CMD:healme(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFF, "Health restored");
SetPlayerHealth(playerid, 100);
return 1;
}
CMD:airport(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFF, "Welcome to LV Airport");
SendClientMessageToAll(0xFFFFFFF, " %s has teleported to LV airport /lv");
SetPlayerPos(playerid,1306.7206,1644.4095,10.8203);
return 1;
}
CMD:dm(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFF, "Welcome to Deathmatch");
SendClientMessageToAll(0xFFFFFFF, " %s has joined the Deathmatch stadium /dm");
SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid, -1079.99, 1061.58, 1343.04);
SetPlayerSkin(playerid, 299);
GivePlayerWeapon(playerid,24,5000);
GivePlayerWeapon(playerid,27,5000);
GivePlayerWeapon(playerid,30,5000);
GivePlayerWeapon(playerid,34,5000);
return 1;
}
CMD:ep(playerid, params[])
{
SendClientMessage(playerid, 0xFFFFFFF, "Emergeny parachute armed!");
GivePlayerWeapon(playerid, 46, 1);
return 1;
}
CMD:ping(playerid, params[])
{
GetPlayerPing(playerid);
return 1;
}
CMD:weaponset(playerid,params[])
{
SendClientMessage(playerid, 0xFFFFFFF, " Weapon set 1: Chainsaw, Teargas, D.eagle, Spaz 12, RPG, Fire Ex. ");
GivePlayerWeapon(playerid, 9, 1);
GivePlayerWeapon(playerid, 17, 9999);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 27, 9999);
GivePlayerWeapon(playerid, 35, 9999);
GivePlayerWeapon(playerid, 42, 9999);
return 1;
}
CMD:weapons(playerid,params[])
{
SendClientMessage(playerid, 0xFFFFFFF, "/weaponset, /ep ");
return 1;
}
CMD:respawn(playerid,params[])
{
SpawnPlayer(playerid);
SendClientMessage(playerid, 0xFFFFFFF, "You have been respawned");
return 1;
}
CMD:armourme(playerid,params[])
{
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0xFFFFFFF, " Armour refilled ");
return 1;
}
CMD:reclass(playerid,params[])
{
ForceClassSelection(playerid);
SendClientMessage(playerid, 0xFFFFFFF, "Re-classing ");
return 1;
}
CMD:Kill(playerid,params[])
{
SetPlayerHealth(playerid, -50000);
SendClientMessage(playerid, 0xFFFFFFF, " You died ");
return 1;
}