How can I do this?
#1

I'd like to make it so once a game day every 24 minutes, players on certain teams will get paid and receive a small message informing them. Thanks in advance!
Reply
#2

https://sampwiki.blast.hk/wiki/SetTimer
Reply
#3

This should work:

Quote:

forward message();

Quote:

SetTimer("message",1440000,true);

Quote:

public message()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pteam = GetPlayerTeam(i);
if(pteam == YOUR TEAM HERE)
{
SendClientMessage(i, 0xBFC0C200, "You've earned something!");
GivePlayerMoney(i, 8000);
}
}
}
}

Reply
#4

Quote:
Originally Posted by Jack_Fox
This should work:

Quote:

forward message();

Quote:

SetTimer("message",1440000,true);

Quote:

public message()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pteam = GetPlayerTeam(i);
if(pteam == YOUR TEAM HERE)
{
SendClientMessage(i, 0xBFC0C200, "You've earned something!");
GivePlayerMoney(i, 8000);
}
}
}
}

Cool I'll try it out thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)