Posts: 82
Threads: 22
Joined: Jul 2012
Reputation:
0
Yeah, is there any way it just sends the message once when the timer hits 0?
Posts: 439
Threads: 62
Joined: Apr 2012
I had this happened before to me, try this;
pawn Код:
forward Check();
public Check()
{
if(!IsPlayerConnected(i))
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(--PlayerInfo[i][pPackageLoading] == 0)
{
SendClientMessage(i, COLOR_LIGHTBLUE, "You are now able to load more products.");
continue;
}
if(PlayerInfo[i][pPackageLoading] < 0)
{
PlayerInfo[i][pPackageLoading] = 0;
}
}
}
return 1;
}
Posts: 82
Threads: 22
Joined: Jul 2012
Reputation:
0
Thanks guys, I added Vince's one wrong, managed to get it to work, thanks Vince.
[pawn]
forward Check();
public Check()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(--PlayerInfo[i][pPackageLoading] == 0 && PlayerInfo[i][pJob] == JOB_TRUCKER )
{
SendClientMessage(i, COLOR_LIGHTBLUE, "You are now able to load more products.");
continue;
}
}
return 1;
}[pawn]
I have this now, would it work so only the players with a trucker job would get the message? I know quite a bit about scripting, but not too sure if this would work in PlayerUpdate