Will this work?
#1

hi,

I want to create a timer which will b for two players. But don't know if it will work. Here is:

pawn Код:
dcmd_spec(playerid, params[])
{
new ReturnPlayer;
if(sscanf(params, "d", ReturnPlayer)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /cwspec [playerid]");
.
.
.
SetTimerEx("RefreshCWHealthArmour", 100, 1, "ii", playerid, ReturnPlayer);
return 1;
}

forward RefreshCWHealthArmour(playerid, specid);
public RefreshCWHealthArmour(playerid, specid)
{
    new Float:pHealth, Float:pArmour, string[256];
    GetPlayerHealth(specid, pHealth);
    GetPlayerArmour(specid, pArmour);
    format(string, sizeof(string), "%d/100", pHealth);
    TextDrawSetString(Textdraw13[playerid], string);
    format(string, sizeof(string), "%d/100", pArmour);
    TextDrawSetString(Textdraw14[playerid], string);
}
Here, i forwarded a public with "playerid" and as target player "specid". It might work?
Reply
#2

Yes, it's correct.
Reply
#3

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)