21.01.2012, 14:24
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.
I got these 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.
Код:
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 }
Код:
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.