Posts: 91
Threads: 22
Joined: Aug 2013
Hello, i need a script code that makes so players cant do /accept death when there is LSFMD / FDSA / medics xD
On duty.
Can someone please help me with this? I give you +rep and I will be thanks to you forever!
Thanks
Posts: 91
Threads: 22
Joined: Aug 2013
Quote:
Originally Posted by mxstr
PHP код:
new count;
for(new i; i< MAX_PLAYERS; i++)
{
if(variable == id || variable == id2) count ++;
}
if(count > 1) return SendClientMessage(playerid, -1, "Sample text");
|
Sure that works? o,o
Posts: 29
Threads: 3
Joined: Oct 2013
Reputation:
0
Well of course, if you substitute "variable" on your variable (for example PlayerInfo[i][pMember]) and "id" on ID fractions "LSFMD / FDSA".
Posts: 91
Threads: 22
Joined: Aug 2013
Quote:
Originally Posted by mxstr
Well of course, if you substitute "variable" on your variable (for example PlayerInfo[i][pMember]) and "id" on ID fractions "LSFMD / FDSA".
|
So how do i install this? Do i just put your code in the top where all "new" variables is?
Posts: 29
Threads: 3
Joined: Oct 2013
Reputation:
0
If you are having difficulties in it, then you shouldn't write your GM, and even more create server.
Start with a simple.
Posts: 760
Threads: 22
Joined: May 2011
Reputation:
0
Make an array with MAX_PLAYERS. Use this on OnPlayerDeath to notify that the specific playerid is dead so that /accept death only works when the player is dead.
In your command, do the for loop explained above to make sure that the command only works while medics are online, or whatever you want to use.
As mxstr explained one post above me, I suggest you start with picking a saving system for a login/register system and then work your way up from there. I started one month ago struggling with login system with y_ini and now I basically know the most things in and out, besides different function names because I have to use ****** for that each time. :P
Posts: 91
Threads: 22
Joined: Aug 2013
Quote:
Originally Posted by Hansrutger
Make an array with MAX_PLAYERS. Use this on OnPlayerDeath to notify that the specific playerid is dead so that /accept death only works when the player is dead.
In your command, do the for loop explained above to make sure that the command only works while medics are online, or whatever you want to use.
As mxstr explained one post above me, I suggest you start with picking a saving system for a login/register system and then work your way up from there. I started one month ago struggling with login system with y_ini and now I basically know the most things in and out, besides different function names because I have to use ****** for that each time. :P
|
That was a good description, but me and scripting = bad as fuck.
I cant do so much, just like adding text commands.
So could anyone please write the code? I would be so happy...