Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <eum>
- forward ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5);
- #define SCM SendClientMessage
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- public OnFilterScriptInit()
- {
- print("\n----------");
- print("[FS]Akcenat");
- print("Credits:");
- print("FS: black_dota");
- print("[INC]EUM: Luka P.");
- print("----------\n");
- return 1;
- }
- public OnPlayerRequestClass(playerid)
- {
- SetPVarInt(playerid,"Akcenat",1);
- return 1;
- }
- COMMAND:akcenat(playerid,params[])
- {
- SCM(playerid,COLOR_FADE1,"Biraj svoj Akcenat!");
- EUM_ShowForPlayer(playerid, 333, ".::Biranje Akcenta::.", "Biraj akcenat:~n~1. Normalan~n~2. Engleski~n~3. Ruski~n~4. Spanski~n~5. Mexicki~n~6. Americki~n~7. Gangsterski~n~8. Irski~n~9. Kolumbijski~n~10. Japanski", 10);
- return 1;
- }
- public OnPlayerResponse(playerid, option)
- {
- if(EUM_Indentify(playerid, 333))
- {
- switch(option)
- {
- case 1: SetPVarInt(playerid,"Akcenat",1), SCM(playerid,COLOR_FADE1,"Odabrao si Normalan Akcenat");
- case 2: SetPVarInt(playerid,"Akcenat",2), SCM(playerid,COLOR_FADE1,"Odabrao si Engleski Akcenat");
- case 3: SetPVarInt(playerid,"Akcenat",3), SCM(playerid,COLOR_FADE1,"Odabrao si Ruski Akcenat");
- case 4: SetPVarInt(playerid,"Akcenat",4), SCM(playerid,COLOR_FADE1,"Odabrao si Spanski Akcenat");
- case 5: SetPVarInt(playerid,"Akcenat",5), SCM(playerid,COLOR_FADE1,"Odabrao si Mexicki Akcenat");
- case 6: SetPVarInt(playerid,"Akcenat",6), SCM(playerid,COLOR_FADE1,"Odabrao si Americki Akcenat");
- case 7: SetPVarInt(playerid,"Akcenat",7), SCM(playerid,COLOR_FADE1,"Odabrao si Gangsterski Akcenat");
- case 8: SetPVarInt(playerid,"Akcenat",8), SCM(playerid,COLOR_FADE1,"Odabrao si Irski Akcenat");
- case 9: SetPVarInt(playerid,"Akcenat",9), SCM(playerid,COLOR_FADE1,"Odabrao si Kolumbijski Akcenat");
- case 10: SetPVarInt(playerid,"Akcenat",10), SCM(playerid,COLOR_FADE1,"Odabrao si Japanski Akcenat");
- }
- }
- EUM_DestroyForPlayer(playerid);
- return 1;
- }
- public OnPlayerText(playerid,text[])
- {
- new chat[128];
- new PlayerName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- if(GetPVarInt(playerid, "Akcenat") == 1)
- {
- format(chat, sizeof(chat), "%s kaže: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 2)
- {
- format(chat, sizeof(chat), "%s kaže[Engleski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 3)
- {
- format(chat, sizeof(chat), "%s kaže[Ruski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 4)
- {
- format(chat, sizeof(chat), "%s kaže[Spanski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 5)
- {
- format(chat, sizeof(chat), "%s kaže[Mexicki]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 6)
- {
- format(chat, sizeof(chat), "%s kaže[Americki]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 7)
- {
- format(chat, sizeof(chat), "%s kaže[Gangsterski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 8)
- {
- format(chat, sizeof(chat), "%s kaže[Irski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 9)
- {
- format(chat, sizeof(chat), "%s kaže[Kolumbijski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- if(GetPVarInt(playerid, "Akcenat") == 10)
- {
- format(chat, sizeof(chat), "%s kaže[Japanski]: %s", PlayerName, text);
- ProxDetector(10.0, playerid, chat, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
- return 0;
- }
- return 1;
- }
- public ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- //radi = 2.0; //Trigger Radius
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- SendClientMessage(i, col1, string);
- }
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- SendClientMessage(i, col2, string);
- }
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- SendClientMessage(i, col3, string);
- }
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- SendClientMessage(i, col4, string);
- }
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
- {
- SendClientMessage(i, col5, string);
- }
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }//not connected
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment