Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // PlayerName stock, RandomEx stock, SCMTAF is my SendClientMessageToAll + Format
- new
- Random_text[9] = "none";
- // OnGameModeInit: SetTimer("Show_random_text", 60000*6, true);
- forward Show_random_text();
- public Show_random_text(){
- format(Random_text, 9, "%c%c%c%c%c%c%c%c",
- Get_random_letter(), Get_random_letter(), Get_random_letter(), Get_random_letter(), Get_random_letter(), Get_random_letter(),
- Get_random_letter(), Get_random_letter());
- SCMTAF(-1, "Napiš jako první do chatu [ %s ] a získej náhodnou částku.", Random_text);
- return true;
- }
- stock randomText_OnPlayerText(playerid, text[]){ // OnPlayerText: randomText_OnPlayerText(playerid, text);
- if(strcmp(Random_text, "none", true)){
- if(!strcmp(text, Random_text, true)){
- new
- amount = RandomEx(3000,5000);
- SCMTAF(-1, "Hráč %s(%d) napsal jako první do chatu [ %s ] a získal $%d.", PlayerName(playerid), playerid, Random_text, amount);
- format(Random_text, 9, "none");
- GivePlayerMoney(playerid, amount);
- }
- }
- return true;
- }
- stock Get_random_letter(){
- return 65 + random(52);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement