SHOW:
|
|
- or go back to the newest paste.
1 | imageID = 0 | |
2 | resources = {{"naruto","aa52f32e6b5a11e78ef9109836a51f7d.png",-80},{"goku","3a5267126b5a11e78ef9109836a51f7d.png",-80},{"goku black","7527e8906b5911e78ef9109836a51f7d.png",-80},{"ash ketchup","b9fccfc46b5b11e78ef9109836a51f7d.png",-60},{"kaneki","fffec41e6b5b11e78ef9109836a51f7d.png",-60},{"saitama","0f3d26086b5e11e78ef9109836a51f7d.png",-100},{"stingy","ce0413266b5e11e78ef9109836a51f7d.png",-120},{"ram","21cb43166e8a11e78ef9109836a51f7d.png",-100},{"izuku","65a962ce6e8b11e78ef9109836a51f7d.png",-100},{"sasuke","4ae6ba086e8c11e78ef9109836a51f7d.png",-75},{"gohan","62a321fa6c1f11e78ef9109836a51f7d.png",-75}} | |
3 | ||
4 | function eventChatCommand(playerName,command) | |
5 | local counter = 1 | |
6 | local found = false | |
7 | repeat | |
8 | - | if (counter == 11) then |
8 | + | if (counter == 12) then -- every time you add new image you have to enlarge counter by 1 |
9 | break | |
10 | end | |
11 | if (command == resources[counter][1]) then | |
12 | tfm.exec.removeImage(imageID) | |
13 | imageID = tfm.exec.addImage(resources[counter][2],"%"..playerName,-35,resources[counter][3]) | |
14 | found = true | |
15 | else | |
16 | counter = counter + 1 | |
17 | end | |
18 | until (found == true) | |
19 | end | |
20 | ||
21 | for i=1,#resources,1 do | |
22 | system.disableChatCommandDisplay(resources[i][1]) | |
23 | end |