SA-MP Forums Archive
text formatting duplicates - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: text formatting duplicates (/showthread.php?tid=503782)



text formatting duplicates - Extraordinariness - 31.03.2014

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:


Re: text formatting duplicates - Extraordinariness - 31.03.2014

anyone? D:


Re: text formatting duplicates - BroZeus - 31.03.2014

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"


Re: text formatting duplicates - newbienoob - 31.03.2014

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