SA-MP Forums Archive
How to do this? :/ - 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: How to do this? :/ (/showthread.php?tid=402153)



How to do this? :/ - RiChArD_A - 25.12.2012

Hello, I need a system for a DM server. I Will explain ... I want that every few kills the player will receive a TextDraw message. Example: When you do 10 kills it will say > "Level 1: Apprentice" and so on. Help please, Thanks


Re: How to do this? :/ - jNkk - 25.12.2012

If you have a register system (else this wouldn't work):

pawn Код:
if(PlayerInfo[playerid][pKills] == 10) { //your code ...
// you can add PlayerInfo[playerid][pKills]++; so you don't get bugs like leveling up each time you log in if you have 10 kills or whatever... just saying
if(PlayerInfo[playerid][pKills] = 500) { // your code ..
And repeat. Look up Kush's tutorial on how to make a DIALOG ACCOUNT SYSTEM.
It will help you out.


Re: How to do this? :/ - jNkk - 25.12.2012

Also add this on OnPlayerDeath if you don't have it:

pawn Код:
PlayerInfo[playerid][pDeaths]++;
PlayerInfo[killerid][pKills]++; // increase kills by 1
Код:
This forum requires that you wait 120 seconds between posts. Please try again in 22 seconds.
This forum requires that you wait 120 seconds between posts. Please try again in 5 seconds.
Worst enemy :X


Re: How to do this? :/ - Konstantinos - 25.12.2012

Better to read the forum rules. Just edit your previous post instead of making a new one and double post.

And that will cause problems.
pawn Код:
PlayerInfo[killerid][pKills]++;
It should be
pawn Код:
if(killerid != INVALID_PLAYER_ID) PlayerInfo[killerid][pKills]++;



Respuesta: Re: How to do this? :/ - RiChArD_A - 25.12.2012

Quote:
Originally Posted by jNkk
Посмотреть сообщение
If you have a register system (else this wouldn't work):

pawn Код:
if(PlayerInfo[playerid][pKills] == 10) { //your code ...
// you can add PlayerInfo[playerid][pKills]++; so you don't get bugs like leveling up each time you log in if you have 10 kills or whatever... just saying
if(PlayerInfo[playerid][pKills] = 500) { // your code ..
And repeat. Look up Kush's tutorial on how to make a DIALOG ACCOUNT SYSTEM.
It will help you out.
Yes i have a register system, Iґll try that but where do i need tu place it


Re : How to do this? :/ - [HRD]Mar1 - 25.12.2012

pawn Код:
if(PlayerInfo[killerid][pKills] == 10) { //your code ...
// you can add PlayerInfo[playerid][pKills]++; so you don't get bugs like leveling up each time you log in if you have 10 kills or whatever... just saying
if(PlayerInfo[killerid][pKills] = 500) { // your code ..
Under OnPlayerDeath


Respuesta: Re : How to do this? :/ - RiChArD_A - 25.12.2012

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
pawn Код:
if(PlayerInfo[killerid][pKills] == 10) { //your code ...
// you can add PlayerInfo[playerid][pKills]++; so you don't get bugs like leveling up each time you log in if you have 10 kills or whatever... just saying
if(PlayerInfo[killerid][pKills] = 500) { // your code ..
Under OnPlayerDeath
What goes on "your code"


Re : Respuesta: Re : How to do this? :/ - [HRD]Mar1 - 25.12.2012

Quote:
Originally Posted by Lauder
Посмотреть сообщение
What goes on "your code"
Tell me what enum you have,
or what admin system you use ?


Respuesta: Re : Respuesta: Re : How to do this? :/ - RiChArD_A - 25.12.2012

Quote:
Originally Posted by [HRD]Mar1
Посмотреть сообщение
Tell me what enum you have,
or what admin system you use ?
1) Whats "enum"
2) My Admin system is very simple I meda it my self from I tutorial It only has /ban /kick /pm and some other commands that are to play music and all that.
3) My register system is also very simple and I gotted from this tutorial: https://sampforum.blast.hk/showthread.php?tid=273088


Re: How to do this? :/ - jNkk - 25.12.2012

Please contact me and we will solve this for sure.
Skype:junkiez.doriftar.