Nu te inregistra daca esti idiot sau agramat!
AlphaCS.RO[ORIGINAL GAMING]
Thanks:
0
Likes:
0
-
[ Tutorial ] Damage Settings
/* define prescurtari ( pentru comoditate ) [ individual ]*/
#define SetPlayerHealth sph
#define GetPlayerHealth gph
#define playerid pi
public
OnPlayerTakeDamage(pi, issuerid, Float: amount, weaponid) {
/*armour */
new
Float: lh
; /* variabila care va raspunde de damage */
gph(pi, lh); /* atribuim variabila catre viata jucatorului, cand impusti in player, i se va modifica procentajul introdus mai jos*/
switch(weaponid) {
case 31: /* id arma */
sph(pi, lh - 4); // [ ( -4 ) - hp-ul playerului scade cu 4 procente ]
/* Daca doresti, poti adauga random damage */
case 31: {
switch(random(4)) {
case 0:
sph(pi, lh - 5);
case 1:
sph(pi, lh - 23);
case 2:
sph(pi, lh - 10);
case 3:
sph(pi, lh - 6);
/*------------------------------------------ */
}
}
/* Daca doresti, poti adauga doar damage pe o anumita parte a corpului*/
case 31: {
switch (bodypart) // id parte a corpului
{
case 3: sph(pi, lh-12);
}
}
}
return 1;
}
/* Partile corpului id */
3 - Trunchi
4 - Partea abdomenului
5 - Mâna stângă
6 - Mâna dreaptă
7 - Piciorul stâng
8 - Piciorul drept
9 - Cap
/*------------------------------------------ */
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules