Money In First Spawn
#1

How I Change The Money Thate Player Spawn's with?(on him not in bank)
and if iil register to my server i got 50k in bank how can i change it so he will start with 500?(500 in bank not on him)?
P.S i use GF GM so i know i need to change something there but i dont know where there?
Reply
#2

Quote:
Originally Posted by Unvisible11
P.S i use GF GM so i know i need to change something there but i dont know where there?
Mabey you should search the forum before posting.
All GF questions here
Reply
#3

Well for the part that gives them money on spawn, you can use this function....

pawn Код:
GivePlayerMoney(playerid, 5000);
As for the part the money in bank, i dont know you will have to goto the GF section....
Reply
#4

Hi I also have a problem.
When I spawn I allways get 1000$ (ive set it to that amount).
When i kill somone i get 1000$.
Lets say that i have 5000$ and somone kills me. Then when I respawn I get 1000$ again.

Can anyone tell me what do I need to do so when I die I will loose 1500$? And get 2000$ if I kill someone?

As I was looking through the gamemode code I found this, do I need to change anything in here to do that above?

-----------------------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
new playercash;

if(killerid == INVALID_PLAYER_ID) {
ResetPlayerMoney(playerid);

} else
{
playercash = GetPlayerMoney(playerid);
if(playercash > 0)
{
GivePlayerMoney (killerid, playercash);
ResetPlayerMoney(playerid);
}
}
return 1;
}
-------------------------------------------------------------------

and at the beginning of the code there Is:

ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 1000);



Sorry for bad english.
Reply
#5

public OnPlayerDeath
{
return 0;
}
This will stop you taking the other persons money when you kill them.
Reply
#6

Quote:
Originally Posted by tom
Can anyone tell me what do I need to do so when I die I will loose 1500$? And get 2000$ if I kill someone?
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new string[50];
  GivePlayerMoney(killerid, 2000); // $2000 For Killer
  SendClientMessage(killerid, 0xFFFFFFAA, "You earned $2000 for killing other player!");
  GivePlayerMoney(playerid, -1500); // $-1500 For Death Player
  SendClientMessage(playerid, 0xFFFFFFAA, "You died and lose $1500!");
  SendDeathMessage(killerid,playerid,reason);
}
Not Sure Does It Work,
but it should Give $2,000 For Killer And Take $1,500 From Player Who Died And Send DeathMessage
Reply
#7

Hi
Jofi
That worked but allways when I log out and back in get the same error
Reply
#8

Where you got

ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 1000);

OnPlayerSpawn or OnPlayerConnect ... ?
( And do you have registration in your script? Because you need it to save moneys )
Reply
#9

I use XAdmin, And the registration is in there.

And at:

ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 1000);

I have
OnPlayerSpawn
Reply
#10

Quote:
Originally Posted by tom
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 1000);

OnPlayerSpawn
Well Remove that..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)