02.11.2014, 11:37
(
Последний раз редактировалось Slipk; 02.11.2014 в 14:24.
)
@Close
public OnGameModeInit()
{
for(new i = 0; i < MAX_PLAYERS; i++) {
MostrarVida[i] = TextDrawCreate(370.000000,396.000000," ");
TextDrawTextSize(MostrarVida[i],645.000000,1.000000);
TextDrawAlignment(MostrarVida[i],0);
TextDrawFont(MostrarVida[i],3);
TextDrawLetterSize(MostrarVida[i],0.490000,1.130000);
TextDrawColor(MostrarVida[i],0xffffffff);
TextDrawSetOutline(MostrarVida[i],1);
TextDrawSetProportional(MostrarVida[i],1);
TextDrawSetShadow(MostrarVida[i],1);
}
return 1;
}
C:\Users\testes\Desktop\asjkdasjkdffssfakfjas.pwn( 24) : error 017: undefined symbol "MostrarVida" C:\Users\testes\Desktop\asjkdasjkdffssfakfjas.pwn( 24) : warning 215: expression has no effect C:\Users\testes\Desktop\asjkdasjkdffssfakfjas.pwn( 24) : error 001: expected token: ";", but found "]" C:\Users\testes\Desktop\asjkdasjkdffssfakfjas.pwn( 24) : error 029: invalid expression, assumed zero C:\Users\testes\Desktop\asjkdasjkdffssfakfjas.pwn( 24) : fatal error 107: too many error messages on one line |
public OnFilterScriptInit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
MostrarVida[i] = TextDrawCreate(370.000000,396.000000," ");
TextDrawTextSize(MostrarVida[i],645.000000,1.000000);
TextDrawAlignment(MostrarVida[i],0);
TextDrawFont(MostrarVida[i],3);
TextDrawLetterSize(MostrarVida[i],0.490000,1.130000);
TextDrawColor(MostrarVida[i],0xffffffff);
TextDrawSetOutline(MostrarVida[i],1);
TextDrawSetProportional(MostrarVida[i],1);
TextDrawSetShadow(MostrarVida[i],1);
}
return 1;
}
public OnGameModeInit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
MostrarVida[i] = TextDrawCreate(370.000000,396.000000," ");
TextDrawTextSize(MostrarVida[i],645.000000,1.000000);
TextDrawAlignment(MostrarVida[i],0);
TextDrawFont(MostrarVida[i],3);
TextDrawLetterSize(MostrarVida[i],0.490000,1.130000);
TextDrawColor(MostrarVida[i],0xffffffff);
TextDrawSetOutline(MostrarVida[i],1);
TextDrawSetProportional(MostrarVida[i],1);
TextDrawSetShadow(MostrarVida[i],1);
}
return 1;
}
//#define FILTERSCRIPT
#include <a_samp>
new TempoMostrarLife[MAX_PLAYERS];
new MostrandoVida[MAX_PLAYERS];
new Text:MostrarVida[MAX_PLAYERS];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
MostrarVida[i] = TextDrawCreate(370.000000,396.000000," ");
TextDrawTextSize(MostrarVida[i],645.000000,1.000000);
TextDrawAlignment(MostrarVida[i],0);
TextDrawFont(MostrarVida[i],3);
TextDrawLetterSize(MostrarVida[i],0.490000,1.130000);
TextDrawColor(MostrarVida[i],0xffffffff);
TextDrawSetOutline(MostrarVida[i],1);
TextDrawSetProportional(MostrarVida[i],1);
TextDrawSetShadow(MostrarVida[i],1);
}
return 1;
}
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
if(IsPlayerConnected(playerid))
{
new str[256], aname[MAX_PLAYER_NAME];
PlayerPlaySound(playerid, 1095, 0.0, 0.0, 0.0);
PlayerPlaySound(issuerid, 6401, 0.0, 0.0, 0.0);
//===================[ playerid ]==================================
new Float:health;
GetPlayerHealth(playerid, health);
if(issuerid == INVALID_PLAYER_ID)
{
KillTimer(TempoMostrarLife[playerid]);
TextDrawShowForPlayer(playerid, MostrarVida[playerid]);
format(str,sizeof(str),"~y~Vida:~r~ -%.1f", amount);
TextDrawSetString(MostrarVida[playerid], str);
TempoMostrarLife[playerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", playerid);
MostrandoVida[playerid] = 1;
}
else
{
KillTimer(TempoMostrarLife[playerid]);
TextDrawShowForPlayer(playerid, MostrarVida[playerid]);
GetPlayerName(issuerid, aname,sizeof(aname));
format(str,sizeof(str),"~y~%s ~n~~w~tirou: ~r~-%.1f", aname, amount);
TextDrawSetString(MostrarVida[playerid], str);
TempoMostrarLife[playerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", playerid);
MostrandoVida[playerid] = 1;
}
//==================[ issuerid ] ======================================
KillTimer(TempoMostrarLife[issuerid]);
TextDrawShowForPlayer(issuerid, MostrarVida[issuerid]);
GetPlayerName(playerid, aname,sizeof(aname));
format(str,sizeof(str),"~y~%s:~g~ -%.1f",aname, amount);
TextDrawSetString(MostrarVida[issuerid], str);
TempoMostrarLife[issuerid] = SetTimerEx("HideTextoLife", 3000, 0, "i", issuerid);
MostrandoVida[issuerid] = 1;
}
return true;
}
forward HideTextoLife(playerid);
public HideTextoLife(playerid)
{
if(MostrandoVida[playerid] == 1)
{
TextDrawHideForPlayer(playerid, MostrarVida[playerid]);
MostrandoVida[playerid] = 0;
}
return true;
}
Compilando Sem tнtulo 1.pwn... Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase Sem tнtulo 1.pwn compilado com sucesso |
Pronto arrumei o cуdigo e jб arrumei outra parada.
Ajudei? +Rep ° Se for filterscript: PHP код:
PHP код:
PHP код:
|