29.05.2010, 19:57
Hey guys.
Today after i finally finished making the status textdraws for my server,i got a problem.
I have a timer in gamemodeinit which updates the X,Y,Z,Angle,Cash,Health,Armour and Score information:
Well here is what happens when i have the timer on:
And here is what happens if i remove it:
Here is the timer callback:
Can you tell me whats wrong please?
Thanks in advance.
Today after i finally finished making the status textdraws for my server,i got a problem.
I have a timer in gamemodeinit which updates the X,Y,Z,Angle,Cash,Health,Armour and Score information:
pawn Code:
SetTimer("Fuck",1,1);
And here is what happens if i remove it:
Here is the timer callback:
pawn Code:
forward Fuck(playerid);
public Fuck(playerid)
{
new N[60];
new Str[60];
GetPlayerName(playerid,N,sizeof(N));
format(Str,sizeof(Str),"Name: %s",N);
TextDrawSetString(Textdraw0,Str);
new IP[60];
GetPlayerIp(playerid,IP,sizeof(IP));
format(Str,sizeof(Str),"IP : %s",IP);
TextDrawSetString(Textdraw1,Str);
new Float:x,Float:y,Float:z,Float:a,Float:c,Float:h,Float:ar,Float:s;
GetPlayerPos(playerid,x,y,z);
format(Str,sizeof(Str),"X: %f",x);
TextDrawSetString(Textdraw2,Str);
format(Str,sizeof(Str),"Y: %f",y);
TextDrawSetString(Textdraw3,Str);
format(Str,sizeof(Str),"Z: %f",z);
TextDrawSetString(Textdraw4,Str);
GetPlayerFacingAngle(playerid,a);
format(Str,sizeof(Str),"Angle : %f",a);
TextDrawSetString(Textdraw5,Str);
c = GetPlayerMoney(playerid);
format(Str,sizeof(Str),"Money : %d$",c);
TextDrawSetString(Textdraw6,Str);
GetPlayerHealth(playerid,h);
format(Str,sizeof(Str),"Health :%s",h);
TextDrawSetString(Textdraw7,Str);
GetPlayerArmour(playerid,ar);
format(Str,sizeof(Str),"Armour : %s",ar);
TextDrawSetString(Textdraw8,Str);
s = GetPlayerScore(playerid);
format(Str,sizeof(Str),"Score: %s",s);
TextDrawSetString(Textdraw9,Str);
}
Thanks in advance.