Posts: 484
Threads: 189
Joined: Jun 2016
Reputation:
0
Help me for +REP
How to made if i slap player that it only takes 5 percent of his health if you understand me!
On setplayerPos set the Z+VALUE to whatever you want, you gotta check where it takes 5 percent.
Posts: 383
Threads: 70
Joined: Feb 2016
Код:
COMMAND:slap(playerid, params[])
{
new iPlayer;
if( sscanf ( params, "u", iPlayer)) return SendClientMessage(playerid,-1, "[PlayerID/PartOfName]");
if(!IsPlayerConnected(iPlayer)) return SendClientMessage(playerid,-1,"No player with that id" );
new Float:old;
GetPlayerHealth(iPlayer,old);
SetPlayerHealth(iPlayer,old-5);
GetPlayerPos(iPlayer,px,py,pz);
return 1;
}
Edited.
Posts: 484
Threads: 189
Joined: Jun 2016
Reputation:
0
I mean whenever i slap playerid it will always take 5 percent of his/her health ?