text formatting duplicates
#1

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == briefcase) {
    new name1[MAX_PLAYER_NAME], string1[128];
    GetPlayerName(playerid, name1, sizeof(name1));
    GivePlayerMoney(playerid, 10000);
    DestroyPickup(briefcase);
    SetTimer("briefcaseend",60000,true);
    KillTimer(briefcase1);
    SetTimer("activatebriefcase",60000,false);
    format(string1, sizeof(string1), ""COL_YELLOW"%s[%d] has got the briefcase! As a reward, he got "COL_GREEN"$10,000!", name1, playerid);
    SendClientMessageToAll(-1, string1);
    printf("%s[%d] won the briefcase reward.",name1, playerid);
    }
    return 1;
}
So my problem is, when I get that briefcase, the text duplicates. Something like this.
[ExampleTimestamp]Extraordinariness[0] has got the briefcase! As a reward, he got $10000!
[ExampleTimestamp]Extraordinariness[0] has got the briefcase! As a reward, he got $10000!

And worst, the money duplicates instead of $10000. How do I do this? D:
Reply
#2

anyone? D:
Reply
#3

i think you have added if(pickupid == briefcase) under OnPlayerPickUpPickup
See ur OnPlayerPickUpPickup and make sure there is only one line as "if(pickupid == briefcase"
Reply
#4

probably problem with your pickup type. try change it; https://sampwiki.blast.hk/wiki/PickupTypes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)