[Help] How to script this
#1

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
Reply
#2

PHP код:
new count;
for(new 
iiMAX_PLAYERSi++)
{
    if(
variable == id || variable == id2count ++;
}
if(
count 0) return SendClientMessage(playerid, -1"Sample text"); 
Reply
#3

Quote:
Originally Posted by mxstr
Посмотреть сообщение
PHP код:
new count;
for(new 
iiMAX_PLAYERSi++)
{
    if(
variable == id || variable == id2count ++;
}
if(
count 1) return SendClientMessage(playerid, -1"Sample text"); 
Sure that works? o,o
Reply
#4

Well of course, if you substitute "variable" on your variable (for example PlayerInfo[i][pMember]) and "id" on ID fractions "LSFMD / FDSA".
Reply
#5

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?
Reply
#6

If you are having difficulties in it, then you shouldn't write your GM, and even more create server.
Start with a simple.
Reply
#7

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
Reply
#8

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...
Reply
#9

Quote:
Originally Posted by AustinWeerdGuy
Посмотреть сообщение
So could anyone please write the code? I would be so happy...

I don't think anyone can do the script for you without having your gm. A problem has more than one solution in scripting, but both of them won't always work, if you get my point. It all depends on your manner of solving.

So if you want a direct script to work with your gm, you should give some coding, so other people can figure exactly what you want.

Before jumping directly to complicated stuff you should try to write more simple stuff. I, for one, started making the tuning system you see in my signature, and now I am trying to update it with a database, so players can save their cars.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)