How can I do this?
#1

When someone dies, I want it to show random game text on the screen for the person who died, for example if I use game text style 6, it will show the random text at the top of the screen when they die. The random messages would be
Код:
Merked
Fail /q
/cry
Fail pause
lol y u suck tho?
u rly suck
Anyone know?
Reply
#2

pawn Код:
new RandomDeathMessages[] = { Merked, Fail /q, /cry, Fail pause, lol y u suck tho?, u rly suck, };
pawn Код:
// add this under onplayerdeath
new msg_holder = random(sizeof(RandomDeathMessages));
GameTextForPlayer(playerid, msg_holder, 5000, 6);
Reply
#3

Thanks, but I get 2 errors

pawn Код:
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\lvtc.pwn(17) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\User\Desktop\Las Venturas True Crime\gamemodes\lvtc.pwn(2054) : error 035: argument type mismatch (argument 2)
Lines:

pawn Код:
/* LINE 17 */ new RandomDeathMessages[] = { Merked, Fail /q, /cry, Fail pause, lol y u suck tho?, u rly suck, pwnt,  scrapped, murdered, t/report, };
/* LINE 2054 */ GameTextForPlayer(playerid,msg_holder,5000,6);
Reply
#4

pawn Код:
new RandomDeathMessages[] = { Merked, Fail /q, /cry, Fail pause, lol y u suck tho?, u rly suck };
if it doesn't work tell me and i'll give you other solution; i forgot how to do this now.
Reply
#5

Still gives me the expected token error (line 17 above)

Maybe its the wrong brackets?
Reply
#6

you can try this..
p.s: I can guarantee this will work
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    switch (random(10))
    {
        case 0: GameTextForPlayer(playerid, "merked", 5000, 6);
        case 1: GameTextForPlayer(playerid, "fail /q", 5000, 6);
        case 2: GameTextForPlayer(playerid, "/cry", 5000, 6);
        case 3: GameTextForPlayer(playerid, "fail pause", 5000, 6);
        case 4: GameTextForPlayer(playerid, "lol y u suck tho?", 5000, 6);
        case 5: GameTextForPlayer(playerid, "u rly suck", 5000, 6);
        case 6: GameTextForPlayer(playerid, "pwnt", 5000, 6);
        case 7: GameTextForPlayer(playerid, "scrapped", 5000, 6);
        case 8: GameTextForPlayer(playerid, "murdered", 5000, 6);
        case 9: GameTextForPlayer(playerid, "t/report", 5000, 6);
    }
    return 1;
}
sorry for my noobism lol
Reply
#7

lol, its ok and thanks but it's still giving the expected token error on line 17 where the new variable starts ahaha
Reply
#8

just delete it lol, delete the other code I gave you
Reply
#9

Admantis, Can you please check this :/

https://sampforum.blast.hk/showthread.php?tid=187229&page=57

At the bottom
Reply
#10

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Admantis, Can you please check this :/

https://sampforum.blast.hk/showthread.php?tid=187229&page=57

At the bottom
sorry, I don't use IRC.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)