Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <foreach>
- new randomMessages[][] = //here, we're creating the array with the name "randomMessages"
- {
- "!שלא תעז לירות עליי",
- "!אל תירה עליי"
- };
- new randomMessages2[][] = //here, we're creating the array with the name "randomMessages"
- {
- "!אל תתקרב אליי",
- "!תתרחק ממני"
- };
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Yakov [F]ilter[S]cript Loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("Yakov [F]ilter[S]cript UnLoaded");
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- new PlayerName[24];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- if(strcmp(PlayerName,"Yakov",true))
- {
- SendClientMessageToAll(0xaaaaff,"Yakov - המלך נכנס לשרת");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new PlayerName[24];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- if(strcmp(PlayerName,"Yakov",true))
- {
- SendClientMessageToAll(0xaaaaff,"Yakov - המלך יצא לשרת");
- }
- return 1;
- }
- forward OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost);
- public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
- {
- new PlayerName[24];
- GetPlayerName(Target, PlayerName, sizeof(PlayerName));
- if(strcmp(PlayerName,"Yakov",true))
- {
- new Float:x, Float:y, Float:z;
- CreateExplosion(x,y,z,10,10);
- new randomMsg = random(sizeof(randomMessages));
- SendClientMessage(Shooter,0xff0000ff, randomMessages[randomMsg]);
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new PlayerName[24];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- if(strcmp(PlayerName,"Yakov",true))
- {
- foreach(new i: Player)
- {
- if(IsPlayerNearPlayer(35, playerid, i) && i != playerid)
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerVelocity(i, X,Y,Z);
- SetPlayerVelocity(i,X+100,Y+100,Z+30);
- new randomMsg = random(sizeof(randomMessages));
- SendClientMessage(i,0xff0000ff, randomMessages2[randomMsg]);
- }
- }
- }
- return 1;
- }
- stock IsPlayerNearPlayer(Float:radius, playerid, otherplayer)
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- if(IsPlayerInRangeOfPoint(otherplayer, radius, X, Y, Z)) return true;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement