Advertisement
DoctorX13

XNames

Oct 19th, 2019 (edited)
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. //Script Created By Senior S
  2. //You are able to edit it as you pleasure
  3.  
  4. //Translations and config: Please respect the spaces.
  5. name_new = "Your new name is ";
  6. error_money = "You dont have necessary money!";
  7. name_error = "Please insert a valid name!";
  8. target_new = "The new name of the target is ";
  9. Cost = 15000; //This is the cost of the new name
  10.  
  11. command newname(arg){
  12.     permission = "XNames.user";
  13.     execute(){
  14.         if(player.experience >= Cost){
  15.             player.experience = player.experience - Cost;
  16.             player.name = toString(arg);
  17.             player.message(name_new + arg, "blue");
  18.         }
  19.         else{  
  20.             player.message(error_money, "red");
  21.         }
  22.     }
  23. }
  24.  
  25. command setname(play, arg){
  26.     permission = "XNames.admin";
  27.     execute(){
  28.         playe = toPlayer(play);
  29.         if(isPlayer(playe) == false){
  30.             player.message(name_error, "red");
  31.         }
  32.         if(isPlayer(playe) == true){
  33.             player.message(target_new + arg);
  34.             playe.name = toString(arg);
  35.             playe.message(name_new + arg, "blue");
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement