Please help me out with this..?
#1

HI readers ,
I want to know this;
In a server where I play the players lose health while they are in a car. (if they crash)
Could anyone help me out with this?
I want to script something simular.
and when you do like
/seatbelt
You lose less health.

Please make this for me in dcmd or strcmp.
(the /seatbelt cmd)
And Please show me how they do this?
I think I know how but I dont know the callbacks and such
Thanks,
Reply
#2

Quote:
Originally Posted by waza75
HI readers ,
I want to know this;
In a server where I play the players lose health while they are in a car. (if they crash)
Could anyone help me out with this?
I want to script something simular.
and when you do like
/seatbelt
You lose less health.

Please make this for me in dcmd or strcmp.
(the /seatbelt cmd)

And Please show me how they do this?
I think I know how but I dont know the callbacks and such
Thanks,
I don`t understand what you need?
pawn Код:
if(strcmp(cmd,"/seatbelt",true)==0)
{
    SetPlayerHealth(playerid,-15);
    return 1;
}
This??
Explain little better,i don`t understand what you need..
Reply
#3

Example:
The player in the car chrashes with a car. and loses 5hp trough that.
If he used /seatbelt he would have only lost 2
Better?
Reply
#4

Yes,i understand now.
You can check with a timer of 2-3 sec if vehicle loose health with IsPlayerInVehicle(playerid); GetVehicleHealth(vehicleid); and then SetPlayerHealth(playerid,-5);
Look,i don`t think i will create commands for you.So better little more learn pawn,then make a scratch for this command,and we will correct if something is wrong
Reply
#5

How do I make that timer? Explain me.. I will try to make the rest myself
Reply
#6

Anyone?
Help me out please. I need to know how it checks the carhealth.. If it went down to much by a crash the player loses health 2.
And when the player does the cmd /seatbelt it loses less health when in a hard chrash
Please help out..
Reply
#7

For making timer use SetTimer.
For getting vehicle health use GetVehicleHealth.

I will create this 'system' little later and release it as filterscript,so watch in Gamemodes and Filterscripts board,stay tuned!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)