27.10.2014, 14:27
My textdraws all are looped , i mean like this
Sometimes the textdraws aren't showing to some players, and i mean all of them , if they do 3-4 relogs it will appear but my problem is how to fix this. OnGameModeExit i haven't putted anything to destroy them or at OnPlayerDisconnect because if i do this they aren't loading or something like this. My question is it will do better if they will be at OnGameModeInit ?
And my 2nd question is how to fix my moneybar, sometimes when i login the textdraws(all of them) aren't showing and my moneybar is 0. Ussualy it's showing correctly.
What i am using is :
pawn Код:
public OnGameModeInit()
{
for(new f = 0; f < MAX_PLAYERS; f++)
{
// and here comes the textdraw with the [f]
And my 2nd question is how to fix my moneybar, sometimes when i login the textdraws(all of them) aren't showing and my moneybar is 0. Ussualy it's showing correctly.
What i am using is :
pawn Код:
#define ResetMoneyBar ResetPlayerMoney
#define UpdateMoneyBar GivePlayerMoney
pawn Код:
public MoneyTimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(MedicCallTime[i] > 0)
{
if(MedicAccepted[i] < 999)
{
if(IsPlayerConnected(MedicAccepted[i]))
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(MedicAccepted[i], X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
}
}
}
if(GetPlayerCash(i) != GetPlayerMoney(i))
{
ResetMoneyBar(i);//Resets the money in the original moneybar, Do not remove!
UpdateMoneyBar(i,GetPlayerCash(i));//Sets the money in the moneybar to the serverside cash, Do not remove!
}
}
}
}

