29.01.2011, 16:49
Anyone have code to set everyones money on Spawn?
Ex:
public OnPlayerSpawn()
{
GivePlayerMoney(playerid, 5000)
}
Ex:
public OnPlayerSpawn()
{
GivePlayerMoney(playerid, 5000)
}
public OnPlayerSpawn(playerid)
{
GivePlayerMoney(playerid, 5000)
return 1;
}
public OnPlayerSpawn(playerid)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,5000);
return 1;
}
// This function sets a random money between 2000-5000 when you spawn.
public OnPlayerSpawn(playerid)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,2000+random(3000));
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
GivePlayerMoney(playerid,-2000);
return 1;
}
public OnPlayerConnect(playerid)
{
GivePlayerMoney(playerid,5000);
return 1;
}
pawn Код:
|
Okay well then make use of OnPlayerDeath and OnPlayerConnect.
pawn Код:
|