View difference between Paste ID: 41QwmS96 and 9qd43u1i
SHOW: | | - or go back to the newest paste.
1
---------------------By Nicknamepll
2
-----------------Minigame name Speedracing
3
-------------11.10.13
4
 
5
tfm.exec.setNameColor("Nicknamepll", 0xFF1900)
6
        tfm.exec.setNameColor("Ouake", 0xFF1900)
7
system.disableChatCommandDisplay("off",true)
8
system.disableChatCommandDisplay("help",true)
9
system.disableChatCommandDisplay("pomoc",true)
10
tfm.exec.disableAutoTimeLeft (true)
11
tfm.exec.disableAutoShaman(true)
12
 
13
function eventNewPlayer(playerName)
14
tfm.exec.bindKeyboard(playerName,37,true,true)
15
tfm.exec.bindKeyboard(playerName,39,true,true)
16
tfm.exec.bindKeyboard(playerName,65,true,true)
17
tfm.exec.bindKeyboard(playerName,68,true,true)
18
end
19
 
20
for playerName,player in pairs(tfm.get.room.playerList) do
21
tfm.exec.bindKeyboard(playerName,37,true,true)
22
tfm.exec.bindKeyboard(playerName,39,true,true)
23
tfm.exec.bindKeyboard(playerName,65,true,true)
24
tfm.exec.bindKeyboard(playerName,68,true,true)
25
end
26
 
27
 
28
function eventKeyboard(playerName,key,down,x,y)
29
if key==37 or key == 65 then
30
tfm.exec.movePlayer(playerName, 0, 0, true, -20, 0, true)
31
elseif key==39 or key==68 then
32
tfm.exec.movePlayer(playerName, 0, 0, true, 20, 0, true)
33
end
34
end
35
 
36
function main()
37
        tfm.exec.disableAutoNewGame (true);
38
        tfm.exec.disableAutoShaman(true);
39
        tfm.exec.disableAutoTimeLeft (true);
40
        tfm.exec.disableAutoScore (true);
41
        tfm.exec.disableAfkDeath (true);
42
end
43
 
44
function eventNewGame ()
45
        tfm.exec.setUIMapName("<b><i>Speedracing</i><b>")
46
        tfm.exec.setGameTime (90*1);
47
        tfm.exec.setUIShamanName ("<B><i>Speedracing</i></b>")
48
end
49
 
50
function eventNewPlayer(playerName)
51
        tfm.exec.chatMessage("Witam w <b><i>#Speedracing!</i></b>",playerName)
52
end
53
 
54
function eventChatCommand(playerName, com)
55
   if com == 'off' then
56
      system.exit()
57
   else if com == 'info' then
58
      ui.addPopup(1,0,"<b><font size='20'color='#13A8B7'>Witaj w <u><i>#Speedracing!</i></u></font><font size='12'color='#D97922'><b>Szybkość myszki 25% (z 5%)</font></b><br /><font size='10'><i>Wyprodukował: <b>Nicknamepll</b></i></font>",playerName,200,100,400)
59
end
60
end
61
end
62
 
63
tfm.exec.disableAutoNewGame(true)
64
maps={"@3535551","@4194139 ","@4203509","@2968636","@4164079","@4149063","@4137883","@4079526","@4057706 ","@3903445 ","@3975221","@4020151","@1882894","@2788292","@3548416","@3015990","@689939","@3353704","@3374495","@3521518","@3211259","@3072840","@3156472","@3114878","@2232477","@3004030","@2994957","@2748155 ","@2887610"}
65
tfm.exec.newGame(maps[math.random(#maps)])
66
 
67
function eventLoop(time,remaining)
68
        if remaining<=0 then
69
                tfm.exec.newGame(maps[math.random(#maps)])
70
        end
71
end
72
 
73
function eventNewPlayer(name)
74
            tfm.exec.bindKeyboard(name,32,true,true)
75
        tfm.exec.respawnPlayer(name);
76
         tfm.exec.setUIShamanName("Speed")
77
end
78
 
79
function eventPlayerWon(name)
80
end
81
 
82
function eventPlayerDied(name)
83
end
84
 
85
 
86
for name,player in pairs(tfm.get.room.playerList) do
87
        system.bindMouse(name, true)
88
end
89
 
90
function eventNewPlayer(name)
91
            tfm.exec.bindKeyboard(name,32,true,true)
92
        tfm.exec.respawnPlayer(name);
93
         tfm.exec.setUIShamanName("<J>Speed</J>")
94
       ui.addPopup(1,0,"<b><font size=%%%quo1%%%>Najlepsze plemienie : <b><i><u>Polish Legends</u></i></b> !</font>",playerName,175,200,450)
95
end
96
 
97
 
98
print '<b>#Speedracing version 0.0.2</b>'              
99
print 'By Nicknamepl'
100
 
101
102
103
------------------------------------------------------------------------------- Version 0.0.2