Need help with menu.
#1

So I made a menu for cluckingbell but when I buy something it is supposed to give more health. However, this one sets the players health to 10, how can I fix it?

Код:
new Float:health;
new currenthealth;
currenthealth = GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, currenthealth + 10);
Reply
#2

This must work

new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health+25);
Reply
#3

Quote:
Originally Posted by [MK
Soprano ]
This must work

new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health+25);

Код:
C:\Users\Broman\Desktop\gta\samp03asvr_win32\filterscripts\Roleplay1.pwn(9128) : error 017: undefined symbol "health"
C:\Users\Broman\Desktop\gta\samp03asvr_win32\filterscripts\Roleplay1.pwn(9142) : error 017: undefined symbol "health"
C:\Users\Broman\Desktop\gta\samp03asvr_win32\filterscripts\Roleplay1.pwn(9157) : error 017: undefined symbol "health"
Reply
#4

Have you written
pawn Код:
new Float:health
? :O

Are
pawn Код:
GetPlayerHealth
and
pawn Код:
SetPlayerHealth
in the same section in the script? :O

It doesn't seem so --> make
pawn Код:
new Float:health
a global variable (Top of the script) ^^ xD
Reply
#5

use this :
Код:
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid,health+10);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)