Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
How can I increase players health like by +5 or 10 when they buy a drink?
Posts: 195
Threads: 14
Joined: Oct 2010
Do you currently have a system for purchasing drinks?
if so, I need to know what variable you use for health.
But it will look something like this;
Код:
playerVariables[playerid][pHealth] += 5;
Add that to the command for purchasing a drink, should work but again you need to adapt it to your script.
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
No im using just a dialog. no zcmd nothing.
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
C:\Users\Oscar\Desktop\*\Modern Life Roleplay [Oscar]\Modern Life Roleplay [Oscar]\pawno\include\func.inc(109) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Users\Oscar\Desktop\*\Modern Life Roleplay [Oscar]\Modern Life Roleplay [Oscar]\pawno\include\func.inc(387) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Users\Oscar\Desktop\*\Modern Life Roleplay [Oscar]\Modern Life Roleplay [Oscar]\pawno\include\func.inc(453) : warning 219: local variable "health" shadows a variable at a preceding level
C:\Users\Oscar\Desktop\*\Modern Life Roleplay [Oscar]\Modern Life Roleplay [Oscar]\pawno\include\func.inc(492) : warning 219: local variable "health" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Warnings.
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
I found one that works thanks anyway rep + for helping me.
new Float:hp;
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid,hp+5);
Posts: 265
Threads: 69
Joined: Feb 2012
Reputation:
0
Now I need to know how to save current position when disconnect.