getplayerhealth
#1

pawn Код:
CMD:stunt(playerid, params[])
{
new name[24], string[56];
new Float:armour;
GetPlayerArmour(playerid, armour);
GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,100000);
SetPlayerArmour(playerid,100000);

CMD:dm(playerid, params[])
{
new name[24], string[56];
new Float:armour;
SetPlayerArmour(playerid, armour);
SetPlayerHealth(playerid,health);
but it not works when u type /dm (from stunt) u got 0 health
^pl0x help....
Reply
#2

pawn Код:
new Float:armour, Float:health;
put this instead of
pawn Код:
new Float:armour;
and try it...
Reply
#3

not works...

pl0X
Reply
#4

pawn Код:
new Float:gArmour[MAX_PLAYERS];// add this two lines near your global variables declaration(under one of your enums).  
new Float:gHealth[MAX_PLAYERS];



CMD:stunt(playerid, params[])
{
new name[24], string[56];
GetPlayerArmour(playerid, gArmour[playerid]);
GetPlayerHealth(playerid, gHealth[playerid]);
SetPlayerHealth(playerid,100000);
SetPlayerArmour(playerid,100000);

CMD:dm(playerid, params[])
{
new name[24], string[56];
SetPlayerArmour(playerid, gArmour[playerid]);
SetPlayerHealth(playerid, gHealth[playerid]);
This should work.
Reply
#5

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
pawn Код:
new Float:gArmour[MAX_PLAYERS];// add this two lines near your global variables declaration(under one of your enums).  
new Float:gHealth[MAX_PLAYERS];



CMD:stunt(playerid, params[])
{
new name[24], string[56];
GetPlayerArmour(playerid, gArmour[playerid]);
GetPlayerHealth(playerid, gHealth[playerid]);
SetPlayerHealth(playerid,100000);
SetPlayerArmour(playerid,100000);

CMD:dm(playerid, params[])
{
new name[24], string[56];
SetPlayerArmour(playerid, gArmour[playerid]);
SetPlayerHealth(playerid, gHealth[playerid]);
This should work.
TY man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)