SA-MP Forums Archive
Refunding 50,000$ And 300 score And MSG - 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: Refunding 50,000$ And 300 score And MSG (/showthread.php?tid=459309)



Refunding 50,000$ And 300 score And MSG - Ponii - 22.08.2013

So far I got this.

Код:
public OnPlayerSpawn(playerid)
{
    GivePlayerMoney(playerid, 50000);

    
    return 1;
}
how do i give them 300 score? Also when they register, they will recieve it. I dont want it everytime they connect. Because it will be abused.

I want it to say " You have been automatically refunded". when they register. how?


Re: Refunding 50,000$ And 300 score And MSG - IceBilizard - 22.08.2013

show me your register function or command


Re: Refunding 50,000$ And 300 score And MSG - [ABK]Antonio - 22.08.2013

what's being refunded if they just registered?

Also, the wiki has got what you need


Re: Refunding 50,000$ And 300 score And MSG - LocMax - 22.08.2013

on top of script: new bool:Refunded[MAX_PLAYERS];

OnDialogResponse > register part: Refunded[playerid] = false;
OnDialogResponse > login part: Refunded[playerid] = true;

OnPlayerSpawn

if(Refunded[playerid] == false)
{
// give rewards here..
Refunded[playerid] = true;
}


Re: Refunding 50,000$ And 300 score And MSG - Ponii - 07.09.2013

hi how to give score?
gscore +300?


Re: Refunding 50,000$ And 300 score And MSG - DanishHaq - 07.09.2013

Quote:
Originally Posted by Ponii
Посмотреть сообщение
hi how to give score?
gscore +300?
pawn Код:
new originalscore = GetPlayerScore(playerid);
new calculation = originalscore + 300;
SetPlayerScore(playerid, calculation);



Re: Refunding 50,000$ And 300 score And MSG - SilentSoul - 07.09.2013

You need then to make saving PlayeInfo.ini for this take a look on y_ini
And about how to give score
pawn Код:
SetPlayerScore(playerid, GetPlayerScore(playerid) + 300);
Search on ****** for Y_ini its easy to use and easy to learn too.


Re: Refunding 50,000$ And 300 score And MSG - Ponii - 07.09.2013

hi danish how about cash?
i want to give them 50,000$
and a red message saying hi


Re: Refunding 50,000$ And 300 score And MSG - Ahrim - 07.09.2013

pawn Код:
GivePlayerCash(playerid, 50000);
SendClientMessage(playerid, 0xCBCCCEFF, "hi");
put that inside.


Re: Refunding 50,000$ And 300 score And MSG - Beckett - 07.09.2013

I don't think its too hard to do that? you don't know how to send a message really?