Arguments do not match error
#3

Quote:
Originally Posted by Koala818
Посмотреть сообщение
Functions GetPlayerHealth and GetPlayerArmour stores the value in a variable.
https://sampwiki.blast.hk/wiki/GetPlayerHealth
https://sampwiki.blast.hk/wiki/GetPlayerArmour

So you must do something like:
pawn Код:
forward SpecUpdate(playerid);
public SpecUpdate(playerid)
{
    if(Spectating[playerid] > 0 && Spectate[playerid] != INVALID_PLAYER_ID) {  
        for(new i = 0; i < 2; i++) {
            TogglePlayerSpectating(playerid, true);
            PlayerSpectatePlayer( playerid, Spectate[playerid] );
            SetPlayerInterior( playerid, GetPlayerInterior( Spectate[playerid] ) );
            SetPlayerVirtualWorld( playerid, GetPlayerVirtualWorld( Spectate[playerid] ) );
            new string[128], Float:zhp, Float:zarmour;
            GetPlayerHealth(playerid, zhp);
            GetPlayerArmour(playerid, zarmour);
            format(string, sizeof(string), "Spectating %s(%d): HP: %f Armour: %f", GetPlayerNameEx(Spectate[playerid]), Spectate[playerid], zhp, zarmour);
            GameTextForPlayer(playerid, string, 5000, 2);
        }  
    }  
    return 1;
}
Thank You +1! Worked perfectly
Reply


Messages In This Thread
Arguments do not match error - by Pboachie - 04.06.2014, 18:14
Re: Arguments do not match error - by Koala818 - 04.06.2014, 18:23
Re: Arguments do not match error - by Pboachie - 04.06.2014, 20:00

Forum Jump:


Users browsing this thread: 1 Guest(s)