Weird issue
#1

PHP код:
        switch(Account[playerid][DuelType])
        {
            case 
0:
            {
                
format(duelmsgsizeof(duelmsg), "DUEL: %s has won the duel against %s at %s! (Bet: %d)"GetName(killerid), GetName(playerid), duelMapNameList[Account[playerid][Map]], Account[Account[playerid][DuelInviter]][Bet]);
                
GivePlayerMoneyEx(killeridAccount[Account[playerid][DuelInviter]][Bet] * 2);
                
SendClientMessageToAll(pCOLOR_LIGHTBLUEduelmsg);
                
CompleteDuel(playeridkillerid); 
If the person that started the duel kills the person he invited, that case 0 is called.

But, if the person who was invited kills the person who sent the duel nothing is called.

Both of their variables are the same.

note: I know this is horribly written, it's just for testing
Reply
#2

Код HTML:
switch(Account[playerid][DuelType]) 
        { 
            case 0: 
            { 
                new duelmsg[128];
                format(duelmsg, sizeof(duelmsg), "DUEL: %s has won the duel against %s at %s! (Bet: %d)", GetName(killerid), GetName(playerid), duelMapNameList[Account[playerid][Map]], Account[Account[playerid][DuelInviter]][Bet]); 
                GivePlayerMoneyEx(killerid, Account[Account[playerid][DuelInviter]][Bet] * 2); 
                SendClientMessageToAll(pCOLOR_LIGHTBLUE, duelmsg); 
                CompleteDuel(playerid, killerid);
I think that you didnt declare duelmsg ?

Idk, try it and tell me if it's working or not.

Edit : I am talking about the msg that's being sent to everyone.
Edit #2 : If that's not what are you talking about, Then please describe the problem.
Reply
#3

There aren't any errors, don't worry about that.

It's just, I should of explained it better lol.

If the person that started the duel kills the person he invited, that case 0 is called.

But, if the person who was invited kills the person who sent the duel nothing is called.

Both of their variables are the same.
Reply
#4

Can you show us the full code ? (Not the full script of course lmao)
Reply
#5

Did you already debug that code? Set the variable of the player who was invited which is Account[playerid][DuelType] to 0 as well?

I would check if it gets called when a player in a duel dies, for both, killerid and playerid, if not means variables are messed up.
Reply
#6

so if I understand what u want to do, u want to duel inviter's type be 1,than put this variable at invitation code: Account[inviter'sid][DuelType] = 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)