OnPlayerTakeDamage [help wanted]
#7

Ok, so i got it to work, when i fall off something it displays my damage, I however still want it to move up. i think i have to store the Float:amount as a variable but im not sure how to do that, hope somebody could help me fix this.

Код:
1373  public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
1374  {
1375       new Float:X, Float:Y, Float:Z;
1376       new string[128];
1377  	speler = playerid;
1378    	SetTimer("Damagestarttimer", 500, false);
1379  	stringa = format(string, sizeof(string), "%.0f",amount);
1380  }
1381
1382  public Damagestarttimer()
1383  {
1384      GetPlayerPos( speler, X, Y, Z );
1385      dmg1 = Create3DTextLabel(stringa,COLOR_RED,X,Y,Z+0.1,50.0,0);
1386      SetTimer("Damagestoptimer", 500, false);
1387      Delete3DTextLabel(dmg1);
1388      return 1;
1389  }
1390
1391  public Damagestoptimer()
1392  {
1393  Delete3DTextLabel(dmg1);
1394  return 1;
1395  }
I got these errors:
Код:
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1375) : warning 203: symbol is never used: "Z"
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1375) : warning 203: symbol is never used: "Y"
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1375) : warning 203: symbol is never used: "X"
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1384) : error 017: undefined symbol "X"
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1385) : error 035: argument type mismatch (argument 1)
D:\Gta related\GTA Modern Warfare\samp\gamemodes\CODSW11.pwn(1379) : warning 204: symbol is assigned a value that is never used: "stringa"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
EDIT: I know I have to use a for loop, but i first want to make the 3d textlabel work in a timer. If it works in the timer i can make the upward motion myself.
Reply


Messages In This Thread
OnPlayerTakeDamage [help wanted] - by klotebandit - 08.12.2011, 12:26
Re : OnPlayerTakeDamage [help wanted] - by mehdi-jumper - 08.12.2011, 12:35
Re: OnPlayerTakeDamage [help wanted] - by klotebandit - 08.12.2011, 14:36
Re: OnPlayerTakeDamage [help wanted] - by klotebandit - 08.12.2011, 15:38
Re: OnPlayerTakeDamage [help wanted] - by jonrb - 08.12.2011, 19:03
Re: OnPlayerTakeDamage [help wanted] - by klotebandit - 09.12.2011, 11:36
Re: OnPlayerTakeDamage [help wanted] - by klotebandit - 21.01.2012, 14:24

Forum Jump:


Users browsing this thread: 3 Guest(s)