Could i do this on my SA-MP server? (UNANSWERED)
#1

I would like to know if it is possible to make it so vehicles on my SA-MP server can be damaged, destroyed, or have tires popped when there are no players in them. I'm closer to being a beginner coder, but if i were given a string of code, and told whether it's a filterscript, gamemode or whatever i can use it.
Reply
#2

UpdateVehicleDamageStatus

Right native for you.
Reply
#3

I remember see'ing a FS for this... Try ****** it out!
Reply
#4

Uhh okay the first guy who posted made no sense to me, please give me beginner instructions on how to do this!
Reply
#5

If you want a system made for you, search around, I'm fairly certain one already exists.
Reply
#6

i have seen one before but i had no idea how to use it, if you could please tell me in beginner terms how to use this: https://sampforum.blast.hk/showthread.php?tid=187259
Reply
#7

Quote:

Usage:

Extract the files to your 'pawno/include' folder, then in your script you put: #include <Damage>, and you are ready to use it.

You can also change some configuration opening damage.inc and tweak it to your taste.

You must include those callbacks, if you don't, you will get an error message.

pawn Код:
public OnPlayerShotVehicle(playerid, vehicleid)
{
    //your code here...
    printf("playerid %d is shooting vehicleid %d", playerid, vehicleid);
    return 1;
}

public OnPlayerUnShotVehicle(playerid, vehicleid)
{
    //your code here...
    printf("playerid %d stopped shooting vehicleid %d", playerid, vehicleid);
    return 1;
}
You will have to add this under their respective callbacks:

pawn Код:
D_OnPlayerConnect(playerid); //Under OnPlayerConnect
D_OnPlayerDisconnect(playerid); //Under OnPlayerDisconnect
D_OnPlayerKeyStateChange(playerid, newkeys, oldkeys); //Under OnPlayerKeyStateChange
That's all, if you don't put it, it won't work and it will give you some warnings.

There he tell it.
Reply
#8

Quote:
Originally Posted by Da' J'
Посмотреть сообщение
There he tell it.
Still don't understand when you just repost it
Reply
#9

Some people still doesn't know how to hook functions/callbacks so you have to do
pawn Код:
public OnPlayerConnect(playerid)
{
    D_OnPlayerConnect(playerid);
    //The rest of your code under this callback...
}

public OnPlayerDisconnect(playerid, reason)
{
    D_OnPlayerDisconnect(playerid);
    //The rest of your code under this callback...
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    D_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
    //The rest of your code under this callback...
}
Reply
#10

Quote:
Originally Posted by BigETI
Посмотреть сообщение
Some people still doesn't know how to hook functions/callbacks so you have to do
pawn Код:
public OnPlayerConnect(playerid)
{
    D_OnPlayerConnect(playerid);
    //The rest of your code under this callback...
}

public OnPlayerDisconnect(playerid, reason)
{
    D_OnPlayerDisconnect(playerid);
    //The rest of your code under this callback...
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    D_OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
    //The rest of your code under this callback...
}
The rest of what code under this callback is my problem, and do i have to put #include damage.inc and place the include into the pawno/includes folder? i'm confused, so what you posted, goes in a filterscript, that you create by putting the include (which to my knowledge adds more commands) into pawno/includes, creating the filterscript you posted, and then activating the filterscript, it should work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)