public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawShowForPlayer(playerid, Textdraw13[playerid]);
SetTimer("mortetex", 1000, false);
return 1;
}
forward mortetex();
public mortetex()
{
TextDrawDestroy(Textdraw13[playerid]);
return 1;
}
error: 017: undefined symbol "playerid"
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawShowForPlayer(playerid, Textdraw13[playerid]);
SetTimer("mortetex", 1000, false);
return 1;
}
forward mortetex(playerid);//utilize no topo do GameMode...
public mortetex(playerid)
{
TextDrawDestroy(Textdraw13[playerid]);
return 1;
}
/*
Nгo й Undefinid й undefined '-'
*/
forward MinhaCallback(int,Float:flo,str[]);
//local aleatуrio
SetTimerEx("MinhaCallback",1000,false,"dfs",10,1.30,"Teste");
public MinhaCallback(int,Float:flo,str[])
{
printf("Foram passados: %d, %f, %s",int,flo,str);
// vai printar: "Foram passados: 10, 1.30, Teste"
return 1;
}
Use SetTimerEx para passar a variбvel playerid para a callback.
Um exemplo simples seria: pawn Код:
@focaxihmuh Seu cуdigo й um falso-funcional. |
forward mortetex();
public OnPlayerDeath(playerid, killerid, reason){
TextDrawShowForPlayer(playerid, Textdraw13[playerid]);
SetTimerEx("mortetex", 1000, false, "i", playerid);
return true;
}
public mortetex() return TextDrawDestroy(Textdraw13[playerid]);