SA-MP Forums Archive
Who can help me make script - 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: Who can help me make script (/showthread.php?tid=622245)



Who can help me make script - Pokemon64 - 20.11.2016

Sorry if i create theme again not here where i should, i don't really know where exactly i should create this type support application. So sorry for it.

So guys i want create top3 players system which show the best player who made the most frag at that moment like. Like this


So this is me textdraw
Код:
Textdraw0 = TextDrawCreate(5.666635, 430.992584, "TOP 3 KILLSTREAKS: 1. KILLS 2. KILLS 3. KILLS");
TextDrawLetterSize(Textdraw0, 0.193333, 1.421629);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, -16776961);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 1);
TextDrawBackgroundColor(Textdraw0, 51);
TextDrawFont(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
I hope someone will help, i would really appreciate that.


Re: Who can help me make script - BiosMarcel - 20.11.2016

You are right, wrong section there is a section(or thread) where u can hire scripters


Re: Who can help me make script - Yaa - 20.11.2016

Quote:
Originally Posted by Pokemon64
Посмотреть сообщение
Sorry if i create theme again not here where i should, i don't really know where exactly i should create this type support application. So sorry for it.

So guys i want create top3 players system which show the best player who made the most frag at that moment like. Like this


So this is me textdraw
Код:
Textdraw0 = TextDrawCreate(5.666635, 430.992584, "TOP 3 KILLSTREAKS: 1. KILLS 2. KILLS 3. KILLS");
TextDrawLetterSize(Textdraw0, 0.193333, 1.421629);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, -16776961);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 1);
TextDrawBackgroundColor(Textdraw0, 51);
TextDrawFont(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
I hope someone will help, i would really appreciate that.
Hello !

You can use any Killstreak system and add TextdrawSetString In OnPlayerDeath Function for create this


Re: Who can help me make script - Pokemon64 - 20.11.2016

Quote:
Originally Posted by Yaa
Посмотреть сообщение
Hello !

You can use any Killstreak system and add TextdrawSetString In OnPlayerDeath Function for create this
I'm to stupid at this so it be better if someone show how its should created.


Re: Who can help me make script - Pokemon64 - 20.11.2016

Pls help.


Re: Who can help me make script - Pokemon64 - 21.11.2016

Up up up


Re: Who can help me make script - IceBilizard - 21.11.2016

This is wrong section for requesting scripts

i have created for you one and its working i have tested it give a try

PHP код:
new Slot1 = -1Slot2 = -1Slot3 = -1Slot4 = -1Slot5 = -1Highestkills 0;
new 
Text:Textdraw0;
public 
OnGameModeInit()
{
    
Textdraw0 TextDrawCreate(476.875000216.833282" ");
    
TextDrawLetterSize(Textdraw00.4000001.600000);
    
TextDrawTextSize(Textdraw0621.0000000.000000);
    
TextDrawAlignment(Textdraw01);
    
TextDrawColor(Textdraw0, -1);
    
TextDrawUseBox(Textdraw01);
    
TextDrawBoxColor(Textdraw0255);
    
TextDrawSetShadow(Textdraw00);
    
TextDrawSetOutline(Textdraw00);
    
TextDrawBackgroundColor(Textdraw0255);
    
TextDrawFont(Textdraw01);
    
TextDrawSetProportional(Textdraw01);
    
TextDrawSetShadow(Textdraw00);
    return 
1;
}
CMD:showtop(playeridparams[])
{
                
/*Note:
                You have to change your kills variable with PlayerInfo[x][kills]
                */
                
for(new x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x)) if (PlayerInfo[x][kills] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot1 x;
                }
                
Highestkills 0;
                for(new 
x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x) && != Slot1) if (PlayerInfo[x][kills] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot2 x;
                }
                
Highestkills 0;
                for(new 
x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x) && != Slot1 && != Slot2) if (PlayerInfo[x][kills][x] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot3 x;
                }
                
Highestkills 0;
                
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~~y~%s_(Kills_%d)~n~~n~"PlayerName(Slot1), PlayerInfo[Slot1][kills]);
                
                if(
Slot2 != -1)
                {
                    
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~~n~"PlayerName(Slot2),PlayerInfo[Slot2][kills]);
                }
                if(
Slot3 != -1)
                {
                    
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~3-~y~%s_(Kills_%d)~n~~n~"PlayerName2(Slot3), PlayerInfo[Slot3][kills]);
                }
                
TextDrawSetString(Textdraw0string);
                        
TextDrawShowForPlayer(playeridTextdraw0);
                return 
1;




Re: Who can help me make script - Pokemon64 - 21.11.2016

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
This is wrong section for requesting scripts

i have created for you one and its working i have tested it give a try

PHP код:
new Slot1 = -1Slot2 = -1Slot3 = -1Slot4 = -1Slot5 = -1Highestkills 0;
new 
Text:Textdraw0;
public 
OnGameModeInit()
{
    
Textdraw0 TextDrawCreate(476.875000216.833282" ");
    
TextDrawLetterSize(Textdraw00.4000001.600000);
    
TextDrawTextSize(Textdraw0621.0000000.000000);
    
TextDrawAlignment(Textdraw01);
    
TextDrawColor(Textdraw0, -1);
    
TextDrawUseBox(Textdraw01);
    
TextDrawBoxColor(Textdraw0255);
    
TextDrawSetShadow(Textdraw00);
    
TextDrawSetOutline(Textdraw00);
    
TextDrawBackgroundColor(Textdraw0255);
    
TextDrawFont(Textdraw01);
    
TextDrawSetProportional(Textdraw01);
    
TextDrawSetShadow(Textdraw00);
    return 
1;
}
CMD:showtop(playeridparams[])
{
                
/*Note:
                You have to change your kills variable with PlayerInfo[x][kills]
                */
                
for(new x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x)) if (PlayerInfo[x][kills] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot1 x;
                }
                
Highestkills 0;
                for(new 
x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x) && != Slot1) if (PlayerInfo[x][kills] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot2 x;
                }
                
Highestkills 0;
                for(new 
x=0x<MAX_PLAYERSx++) if (IsPlayerConnected(x) && != Slot1 && != Slot2) if (PlayerInfo[x][kills][x] >= Highestkills)
                {
                    
Highestkills PlayerInfo[x][kills];
                    
Slot3 x;
                }
                
Highestkills 0;
                
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~~y~%s_(Kills_%d)~n~~n~"PlayerName(Slot1), PlayerInfo[Slot1][kills]);
                
                if(
Slot2 != -1)
                {
                    
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~~n~"PlayerName(Slot2),PlayerInfo[Slot2][kills]);
                }
                if(
Slot3 != -1)
                {
                    
format(stringsizeof(string), "_______Top_3_Killers~n~~n~1-~g~%s_(Kills_%d)~n~2-~y~%s_(Kills_%d)~n~3-~y~%s_(Kills_%d)~n~~n~"PlayerName2(Slot3), PlayerInfo[Slot3][kills]);
                }
                
TextDrawSetString(Textdraw0string);
                        
TextDrawShowForPlayer(playeridTextdraw0);
                return 
1;

Omg dude your the best (y) thanks a lot.


Re: Who can help me make script - Pokemon64 - 21.11.2016

IceBilizard i test with one player and its just show me name, bat they doesnt detect other player name its was something like this
1.Name_Name - (Kills 0)
1. - (kills) i dont sure if its show him frags or not i dont really remember :d bat i'm remember that its doesn't show his name.

And its always show 0 frags.


Re: Who can help me make script - IceBilizard - 21.11.2016

Try to add this

PHP код:
PlayerName2(playerid)
{
  new 
pname[MAX_PLAYER_NAME];
  
GetPlayerName(playeridpnamesizeof(pname));
  return 
pname;

And about kills showing 0 maybe you don't have any working kill system because i have tested this in my script it was working fine.