Guest User

Klingon Translator | FS Source

a guest
Oct 11th, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.79 KB | None | 0 0
  1. //Credits goes to Slice, xeeZ, The Klingon University and the SA-MP team. I only claim little credit.
  2.  
  3. #include <a_samp>
  4. #include <translate>
  5.  
  6. public OnFilterScriptInit() {
  7.     // Do this once for each language
  8.     new klingon = LoadLanguage("klingon.lang.inc");
  9.  
  10.     if (klingon == -1) {
  11.         print("Unable to load klingon.lang.inc, make sure it's in your scriptfiles folder!");
  12.         return 1;
  13.     }
  14.  
  15.     // test playerid
  16.     new playerid = 0;
  17.  
  18.     // set language for playerid 0
  19.     SetPlayerLanguage(0, klingon);
  20.  
  21.     // send messages in playerid's language
  22.     print(__("Yes", playerid));
  23.     print(__("No", playerid));
  24.     print(__("What do you want?", playerid));
  25.     print(__("What's happening?", playerid));
  26.     print(__("Huh?", playerid));
  27.     print(__("I understand", playerid));
  28.     print(__("I don't understand", playerid));
  29.     print(__("Good!", playerid));
  30.     print(__("Well done!", playerid));
  31.     print(__("Come in", playerid));
  32.     print(__("Come here", playerid));
  33.     print(__("Go away", playerid));
  34.     print(__("Don't be silly", playerid));
  35.     print(__("Today is a good day to die", playerid));
  36.     print(__("We are Klingons!", playerid));
  37.     print(__("Happy Birthday", playerid));
  38.     print(__("What time is it?", playerid));
  39.     print(__("Shut up!", playerid));
  40.     print(__("That's great news!", playerid));
  41.    
  42.     return 1;
  43. }
  44.  
  45. /*
  46.  
  47. Alright, now you want to create a SendClientMessage text? This is how you do it.
  48.  
  49. SendClientMessage(playerid, -1, printf__("We are Klingons!", playerid));
  50.  
  51.  
  52. How do you send a string using SendClientMessage? This is how you do it.
  53.  
  54. SendClientMessage(playerid, -1, sprintf(__("Function1 %s gives to Function2 %s.", playerid), function1, function2));
  55.  
  56. *function1/function2 are all defined, please use your brains if you want to figure this out, this is just a sample I learnt!*
  57.  
  58. */
Advertisement
Add Comment
Please, Sign In to add comment