Refunding 50,000$ And 300 score And MSG
#1

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?
Reply
#2

show me your register function or command
Reply
#3

what's being refunded if they just registered?

Also, the wiki has got what you need
Reply
#4

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;
}
Reply
#5

hi how to give score?
gscore +300?
Reply
#6

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

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.
Reply
#8

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

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

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


Forum Jump:


Users browsing this thread: 2 Guest(s)