Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 26.01.2010
wit hte last one you just conused me ... and another thing confuses me is that , u know how about those == -1 , what are these ? do i have to change them ?
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 26.01.2010
This is why we have the -1
pawn Code:
public OnPlayerSpawn(playerid)
{
//Assuming team has already been chosen
if(sargeants[playerTeam[playerid]]==-1)
{
//Only get here if there is no sargeant yet
sargeants[playerTeam[playerid]]=playerid;
}
}
So at the beginning of the game, whoever spawns fisrt becomes sargent.
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 26.01.2010
.. lol whats wit hte president again ... lol
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 26.01.2010
Again just copied it from the old script, changed!
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 26.01.2010
HAHAHa you are a funny guy , hahah , well i dont even know what to do now ..........
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 26.01.2010
Well I don't know how else to explain it.
So maybe
https://sampwiki.blast.hk/
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 26.01.2010
ah cmon , can u do it for the other pair too , pls
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 27.01.2010
You need to learn sometime.
Its really not that hard to change. Really really easy.
I don't know how much easier to say it, i basically told you exactly what to write.
When you set player team just use another number for your new teams you have 0 and 1, just use 2 ,3 ,4 ,... for however many teams you have.
Then set Sargents[4] = {-1,-1,-1,-1}; //for 4 teams.
Seriously how hard is that.
Go to the samp wiki and learn how to script:
Are you a scripting beginner?
I am trying to be nice here, but if you can't follow such a simple script, then you really need to go back to basics.
Is samp pawn your first language? cause then i would understand, its a hard first language.
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 27.01.2010
ahhh u are making my life harder .. look but for which teams is this for new sargeants[2]={-1,-1}; ?
for the first 2 ?
and to make it for other treas i put hte number if the first one ? ...
Re: how to make a soldier aotumaticly be general when the general dies ? -
Kinetic - 27.01.2010
Honestly I think that if you cant handle this, you need to practice on something of a lower caliber. If you ever want to learn any kind of coding, don't rely on people to give it to you. And especially when a code is given, dont ask for more. If I were mansonh, I would just let this guy figure it out by himself, cuz he has already helped out a ton.
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 27.01.2010
Quote:
|
Originally Posted by Kinetic
Honestly I think that if you cant handle this, you need to practice on something of a lower caliber. If you ever want to learn any kind of coding, don't rely on people to give it to you. And especially when a code is given, dont ask for more. If I were mansonh, I would just let this guy figure it out by himself, cuz he has already helped out a ton.
|
.................... he is helping me because i realy need help ....
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 27.01.2010
No I am not making your life harder.
if(Give someone a peice of code) they will come back when it breaks && you failed to teach them;
else if(Give someone the instructions to do it themselves)
{
If(They learn) they are coders;
else they are not;
}
I am trying to help you, but if you cannot/not willing to learn and figure things out yourself, then I cannot help you. This is a very simple peice of code to understand, and as Kenetic said,
Quote:
you need to practice on something of a lower caliber.
|
I am guessing that this is your first programming language. I would seriously suggest something easier:
http://www.python.org/ is a very good language to start learning on.
http://www.python.org/doc/2.5.2/tut/tut.html
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 27.01.2010
ok i think i got it ... and htanks very much ! and i got another question . how to put balance between teams ?
Re: how to make a soldier aotumaticly be general when the general dies ? -
mansonh - 27.01.2010
Wherever you set the player teams, check if the teams are balanced.
Theres lots of team balancing code out there. heres just one simple example:
http://forum.sa-mp.com/index.php?top...8134#msg848134
Re: how to make a soldier aotumaticly be general when the general dies ? -
AlbanianGuy - 29.01.2010
hey , i just tested the" how to make the soldier , sargeant , and the player , doesnt respawn as sargeant .. it just says , the sargean has died ,, (this guy )is now sargeant .. and the guy who has to be sargeant doesnt become sargeant ...and do u know how to make players like , the sargeant to now be chosen anymore .. after on player odes, and ot send to playerid message , the sargeant isnt avaliable , you will spawn as police , (in case the player pushes LEFTSHIFT to spawn he spawns as police , only when hte sargeant isnt avaliable ? pls pls pls pls psl , help , me , and can i ask u one question , why u dont want to help me ,a nd let me figure it out by myselff, cuz i dont have a clue...........
Re: how to make a soldier aotumaticly be general when the general dies ? -
Jonny5 - 13.05.2012
hes already helped you! 4 pages of help i see.
he just about wrote your hole code for you and if you cant be bothered to
read and learn yourself then no one will help!
The point was you dont have a clue! Like you just said, that means go get a clue!
read the wiki, pawn language ref, tutorials ect..
Stop trying to script a server when you are not a scripter!
Learn to script first then try to write a server...