Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define Yellow 0xFFFF00AA
- #define Black 0x000000FF
- #define Blue 0x00FFFFFF
- #define Pink 0xFF00FFFF
- #define GreenD 0x33AA33AA
- #define Grey 0x999999ff
- #define Orange 0xFF9900AA
- #define White 0xFFFFFFFF
- #define Green 0x00FF00FF
- #define Red 0xFF0000FF
- //=========== - Defines - ===========
- new Pickup[7];
- new Move[1];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by Or - ShiTDemoN & Kfir - H0LyPrO");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Filterscript by Or - ShiTDemoN & Kfir - H0LyPrO");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- SetGameModeText("RPMode");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(270, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- //--------Pizza - Grove Street--------
- Pickup[0] = CreatePickup(1239,23,2105.4868,-1806.5668,13.5547);
- Pickup[1] = CreatePickup(1239,23,372.3207,-133.5246,1001.4922);
- //--------Binco Clothes Shop - Grove Street--------
- Pickup[2] = CreatePickup(1239,23,2244.3958,-1665.5691,15.4766);
- Pickup[3] = CreatePickup(1239,23,207.6549,-111.2661,1005.132);
- //--------Los Santos Police Department--------
- Pickup[4] = CreatePickup(1239,23,1555.4967,-1675.6340,16.1953);
- 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)
- {
- 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[])
- {
- // text range
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- new s[256];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- format(s, sizeof(s), "%s [ID:%d] say: %s ",pName, playerid, text);
- if(IsPlayerInRangeOfPoint(i, 5, x, y, z))
- {
- SendClientMessage(i, Grey, s);
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new cmd[256],idx;
- cmd = strtok(cmdtext,idx);
- new tmp[256];
- tmp = strrest(cmdtext,idx);
- // b
- if(!strcmp(cmd,"/b",true))
- {
- if(!strlen(tmp)) return SendClientMessage(playerid,0xFF9900AA,"ERROR: /B Text");
- for(new i; i<MAX_PLAYERS;i++)
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- if(IsPlayerInRangeOfPoint(i,10.0,X,Y,Z))
- {
- new str[256];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- format(str,sizeof(str),"((%s [ID:%d] say: %s ))" ,pName,playerid,tmp);
- SendClientMessage(i,0xFF9900AA,str);
- }
- }
- return 1;
- }
- // b end
- 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 OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == Pickup[0])
- {
- GameTextForPlayer(playerid,"~g~Pizza",1000,1);
- }
- if(pickupid == Pickup[2])
- {
- GameTextForPlayer(playerid,"~g~Clothes Shop",1000,1);
- }
- if(pickupid == Pickup[4])
- {
- GameTextForPlayer(playerid,"~g~LSPD",1000,1);
- }
- if(pickupid == Pickup[5])
- {
- GameTextForPlayer(playerid,"~g~Taxi Station",1000,1);
- }
- 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)
- {
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- if(PRESSED(KEY_SECONDARY_ATTACK))
- {
- if(IsPlayerInRangeOfPoint(playerid,1.0,2104.8760,-1806.3451,13.5547))
- {
- SetPlayerInterior(playerid,5);
- SetPlayerPos(playerid,372.3520,-131.6510,1001.4922);
- SetPlayerFacingAngle(playerid,359.9000);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,1.0,372.3207,-133.5246,1001.4922))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2101.6208,-1806.2668,13.5547);
- SetPlayerFacingAngle(playerid,88.3070);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,1.0,2244.3958,-1665.5691,15.4766))
- {
- SetPlayerInterior(playerid,15);
- SetPlayerPos(playerid,207.7380,-109.0200,1005.1328);
- SetPlayerFacingAngle(playerid,0.0000);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,1.0,207.6549,-111.2661,1005.1328))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,2244.9370,-1664.0079,15.4766);
- SetPlayerFacingAngle(playerid,342.8983);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,1.0,1080.4435,-1741.8802,13.4836))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1080.4448,-1738.8640,13.5101);
- SetPlayerFacingAngle(playerid,1.4081);
- return 1;
- }
- if(IsPlayerInRangeOfPoint(playerid,1.0,1080.3885,-1740.9690,13.4917))
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,1080.3326,-1743.6438,13.4683);
- SetPlayerFacingAngle(playerid,175.0775);
- return 1;
- }
- }
- if(PRESSED(KEY_CROUCH))
- {
- if(IsPlayerInRangeOfPoint(playerid,5.0,1102.009765625, -1743.4544677734, 13.11607170105))
- {
- SetObjectRot(Move[0],1.6095886230469, 0, 91.355895996094);
- SetTimerEx("Gate",6000,0,"i",playerid);
- return 1;
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- if(IsPlayerInRangeOfPoint(playerid,10.0,X,Y,Z))
- {
- ShowPlayerNameTagForPlayer(i,playerid,1);
- }
- }
- 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;
- }
- stock strrest(const string[],index)
- {
- new length = strlen(string),offset = index,result[256];
- while((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r')) result[index - offset] = string[index],index++;
- result[index - offset] = EOS;
- if(result[0] == ' ' && string[0] != ' ') strdel(result,0,1);
- return result;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement