Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 30 //Server slots
- //About pools introduced in 0.3.7
- //They are for perfect for loops (foreach vorks in similar way)
- //but we still need MAX_PLAYERS to allocate memory.
- //#include <sscanf2>//http://forum.sa-mp.com/showthread.php?t=570927 Emmet_ has took over support for these plugin (Thank you)
- //#include <streamer>//http://forum.sa-mp.com/showthread.php?t=102865
- #include <zcmd>//I dont use groups,language or anything like that in YSI so i dont need YCMD
- #include <YSI\y_iterate>//Foreach
- #include <YSI\y_va>//You know that handy optional parameters as format in SendClientMessage? These is it!
- //#include <YSI\y_hooks>//Uncomment if you are gonna use hooks
- //Handy thing, just like ZMD for commands, these is for dialogs. Didnt test with 0.3.7 but checked code and it should work fine
- //#include <easyDialog>//http://forum.sa-mp.com/showthread.php?t=475838&page=7
- AntiDeAMX()
- {
- new a[][] =
- {
- "Unarmed (Fist)",
- "Brass K"
- };
- #pragma unused a
- }
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- AntiDeAMX();
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- AntiDeAMX();
- // Don't use these lines if it's a filterscript
- SetGameModeText("Blank Script");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnIncomingConnection(playerid, ip_address[], port)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- 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 OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- //if(newkeys == KEY_FIRE) --->>> Wrong!
- //if(newkeys & KEY_FIRE) --->>> Right...
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- //Only works in filterscripts but not in a gamemode...
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- //In case you are using ZCMD/YCMD (Or anything like them) these is not called
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- return 1;
- }
- return 0;
- }
- //==============================================================================
- //--->>> ZCMD/YCMD (Uncomment if you use it)
- //==============================================================================
- /*
- public OnPlayerCommandReceived(playerid, cmdtext[])
- {
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- return 1;
- }
- */
- //==============================================================================
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnActorStreamIn(actorid, forplayerid)
- {
- return 1;
- }
- public OnActorStreamOut(actorid, forplayerid)
- {
- return 1;
- }
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
- {
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
- {
- return 1;
- }
- public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart)
- {
- return 1;
- }
- //==============================================================================
- //--->>> Object,picup,checkpoint (Dont use with streamer)
- //==============================================================================
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerEditObject( playerid, playerobject, objectid, response,
- Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ )
- {
- return 1;
- }
- public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
- Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
- Float:fRotX, Float:fRotY, Float:fRotZ,
- Float:fScaleX, Float:fScaleY, Float:fScaleZ )
- {
- return 1;
- }
- public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
- {
- return 1;
- }
- //==============================================================================
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- //==============================================================================
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- //==============================================================================
- //--->>> Vehicles...
- //==============================================================================
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnEnterExitModShop(playerid, enterexit, interiorid)
- {
- 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 OnVehicleDamageStatusUpdate(vehicleid, playerid)
- {
- return 1;
- }
- public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- //==============================================================================
- //--->>> Menu
- //==============================================================================
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 0;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- return 1;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- return 0;
- }
- public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
- {
- return 0;
- }
- //==============================================================================
- //--->>> Streamer plugin
- //==============================================================================
- //Streamer include is not like others, but we still can use its defines :P
- #if defined STREAMER_TYPE_OBJECT
- public OnDynamicObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
- {
- return 1;
- }
- public OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:x, Float:y, Float:z)
- {
- return 1;
- }
- public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z)
- {
- return 1;
- }
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- return 1;
- }
- public OnPlayerEnterDynamicRaceCP(playerid, checkpointid)
- {
- return 1;
- }
- public OnPlayerLeaveDynamicRaceCP(playerid, checkpointid)
- {
- return 1;
- }
- public OnPlayerEnterDynamicArea(playerid, areaid)
- {
- return 1;
- }
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- return 1;
- }
- //Enabled with native Streamer_ToggleErrorCallback(toggle);
- public Streamer_OnPluginError(error[])
- {
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement