#1

guys how i can make : atm i have OnPlayerSpawn give player money 100

than allways whn i die etc i get 100$+ and again and again or when i quit the game and come back it give me 100$

how i can make this money on player spawn wont give it again 100+ when i spawn or something ...
Reply
#2

you have GivePlayerMoney on, OnPlayerSpawn so everytime they spawn they will get 100+

you can try put it in playerclasses or onplayerconnect which will only give it to them once when they connect.
Reply
#3

Top of your script add:

Код:
new spawncash[MAX_PLAYERS];
OnPlayerConnect
Код:
spawncash[playerid] = 0;
Then you can do this on spawn.

Код:
public OnPlayerSpawn(playerid)
{
  if(spawncash[playerid] == 0)
   {
   GivePlayerMoney(playerid, 100);
   spawncash[playerid] = 1;
   }
}
Reply
#4

or you can use
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
GivePlayerMoney(playerid, 100);
return 1;
}
this gives the player $100 ammount of money when he finish requesting class !
Reply
#5

the best way you can do this is:
Quote:

public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid,100);
return 1;
}

Reply
#6

Soxfans sugestion is best so far because it does exactly what he wants. He wanted a script to give a player money but only on their first spawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)