SA-MP Forums Archive
Some DMing help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some DMing help (/showthread.php?tid=367344)



Some DMing help - 69 - 09.08.2012

Hi.
I would like very basic scriptlines for the following, I just would like to know their functions, I'll edit the rest:
- How to give ONE score point to a person if they kill someone (Is it related to OnPlayerDeath?)
- How to put a text (the server's name) in the bottom of the screen.
- How to attach an object to a vehicle (And how to find where to put the coordinates please)
- How to add spawn protection for 5 seconds (very important to me)

Thank you in advance!!

EDIT: Oh, and also how to change a permanent vehicle's plates (vehicle created using AddStaticVehicle).


Re: Some DMing help - Jstylezzz - 09.08.2012

- How to give ONE score point to a person if they kill someone (Is it related to OnPlayerDeath?)
- How to put a text (the server's name) in the bottom of the screen.
- How to attach an object to a vehicle (And how to find where to put the coordinates please)
- How to add spawn protection for 5 seconds (very important to me)

----

1- it is, just do:
pawn Код:
public OnPlayerDeath(playerid,killerid)
{
new score = GetPlayerScore(killerid);
SetPlayerScore(killerid,score+1);
}
2. this can be done with textdraws, you can use Zamarot's textdraw editor for that.

3.AttachObjectToVehicle, you can get the coords with Insanity Vehicle Attachment Editor

4.with:
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetTimerEx("Vulnerable",5000,false,"i",playerid);
    SetPlayerHealth(playerid,9999);
}
forward Vulnerable(playerid);
public Vulnerable(playerid)
{
    SetPlayerHealth(playerid,100);
}
I hope this helps you with scripting your stuff..
If i forgot anything, just say, and i will look it up


Re : Some DMing help - 69 - 09.08.2012

Thank you a lot! Also, I would like to know how to put plates in my permanent vehicles (I don't want a script used to edit plates, just how to add them from the script).


Re: Some DMing help - Jstylezzz - 09.08.2012

with a command or just when the vehicle spawns?
you can use SetVehicleNumberPlate for that


Re : Some DMing help - 69 - 09.08.2012

Thanks a whole lot! Repp'ed!