09.12.2018, 11:24
Hi, i started scripting SA-MP yesterday, and i wanted to make a command called: "heal", but it's not working!
Code:
CMD:heal(playerid, params[]){
new targetid;
if(sscanf(params, "ud", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Perdorimi: /heal [ID]");
else {
new Float:currentHp;
new Float:hpmomentale = GetPlayerHealth(playerid, currentHp);
SetPlayerHealth(playerid, 100-hpmomentale);
return 1;
}
}
Any help?
Code:
CMD:heal(playerid, params[]){
new targetid;
if(sscanf(params, "ud", targetid)) return SendClientMessage(playerid, 0xFF0000AA, "Perdorimi: /heal [ID]");
else {
new Float:currentHp;
new Float:hpmomentale = GetPlayerHealth(playerid, currentHp);
SetPlayerHealth(playerid, 100-hpmomentale);
return 1;
}
}
Any help?