SA-MP Forums Archive
PayDay for different factions - 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: PayDay for different factions (/showthread.php?tid=303505)



PayDay for different factions - huliojeans - 13.12.2011

Aloha everyone.
I have a little issue...
How am I supposed to set payday for factions? Let's say i want the Police Department get 9,400$ / hour. How can I do this?


Re: PayDay for different factions - Rob_Maate - 13.12.2011

pawn Код:
public IsACop(i)
{
  if(/*insert the variable that stores whether i is a cop*/ == true) return true;
  return false;
}

public PayDay()
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i) && IsACop(i))
    {
      GivePlayerMoney(i, 9400);
    }
  }
}

public OnGameModeInit()
{
  SetTimer(PayDay, 600000, true);
}



Re : PayDay for different factions - rbcrp - 14.12.2011

are you using vortex? Or what are you using?


Re : PayDay for different factions - rbcrp - 14.12.2011

if you are using Vortex you would do this

public PayDay()
{
new value = 9400+random(1000);
if(IsPlayerConnected(i))
{
if(Player[playerid][Group] == (policegroup))
{
GivePlayerMoney(playerid, copmoney);
}
}
return 1;
}


Re: PayDay for different factions - N0FeaR - 14.12.2011

what sricpt you using?


Re: PayDay for different factions - huliojeans - 14.12.2011

I'm using LARP.


Re: PayDay for different factions - N0FeaR - 14.12.2011

Quote:
Originally Posted by huliojeans
Посмотреть сообщение
I'm using LARP.
and that are Ravens right?


Re: PayDay for different factions - huliojeans - 14.12.2011

Majbe Jag maste kolla