Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Script-Implementation Created by Senior S
- //Cogito ergo sum :)
- Zone1 = "Insert_The_name_of_the_zone";
- Zone2 = "Insert_The_name_of_the_zone";
- //You can add more zones to detect, only add more variables here and add other if to the event OnPlayerChatted!
- event onPlayerChatted(player, message, chatMode, color, cancel){
- ZE1 = "AZ-Enter-" + Zone1 + "-AZ-Implementation";
- ZE2 = "AZ-Enter-" + Zone2 + "-AZ-Implementation";
- ZL1 = "AZ-Leave-" + Zone1 + "-AZ-Implementation";
- ZL2 = "AZ-Leave-" + Zone2 + "-AZ-Implementation";
- if(message.contains("AZ-Enter-")){ //This detect when one player enter in any zone!
- player.setData("In-AZ-Zone", 1);
- cancel = true;
- //Insert your code!
- }
- if(message.contains("AZ-Leave-")){ //This detect when one player enter in any zone!
- player.setData("In-AZ-Zone", 1);
- cancel = true;
- //Insert your code!
- }
- if(message == ZE1){ //This detect when one player enter in the specific zone!
- cancel = true;
- //Insert your code!
- }
- if(message == ZE2){ //This detect when one player enter in the specific zone!
- cancel = true;
- //Insert your code!
- }
- if(message == ZL1){ //This detect when one player enter in the specific zone!
- cancel = true;
- //Insert your code!
- }
- if(message == ZL2){ //This detect when one player enter in the specific zone!
- cancel = true;
- //Insert your code!
- }
- }
- event onPlayerJoined(player){
- player.setData("In-AZ-Zone", 0); //You can use this to check if the player is in a zone!
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement