SA-MP Forums Archive
help plis - 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: help plis (/showthread.php?tid=654262)



help plis - Mati18 - 25.05.2018

hello how are sorry for my bad English but I have a problem and I do not know how to create a game but when only one player in the game that waits until another to play if you can help me thank you goodbye


Re: help plis - DrUnix - 25.05.2018

Can you speak clearly?


Re: help plis - Gammix - 25.05.2018

Quote:
Originally Posted by DrUnix
Посмотреть сообщение
Can you speak clearly?
He literally said his English is bad, and i can somewhat makeout what problem/what he wants.


Re: help plis - Sew_Sumi - 25.05.2018

So can I... If you're just going to moan about someones language without even trying to read what it is, then don't post and just leave it be.

He's wanting a system that when one player joins a server, or a minigame, that it won't 'start' until a second player joins.

Now, DrUnix, Show your skill and throw up a concept of this scenario, or any sort of functions, or callbacks this person should be using...


Re: help plis - GTLS - 25.05.2018

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
So can I... If you're just going to moan about someones language without even trying to read what it is, then don't post and just leave it be.

He's wanting a system that when one player joins a server, or a minigame, that it won't 'start' until a second player joins.

Now, DrUnix, Show your skill and throw up a concept of this scenario, or any sort of functions, or callbacks this person should be using...
Waiting for DrUnix to show his skills lol


Re: help plis - Mati18 - 27.05.2018

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
So can I... If you're just going to moan about someones language without even trying to read what it is, then don't post and just leave it be.

He's wanting a system that when one player joins a server, or a minigame, that it won't 'start' until a second player joins.

Now, DrUnix, Show your skill and throw up a concept of this scenario, or any sort of functions, or callbacks this person should be using...
hi can you help me plis


Re: help plis - Mugala - 28.05.2018

If I correctly understood, you want a player to wait for another player.
Looks like you already have a code for a game.

you can do it with many ways, I'll type a simple one.

at the top of the code
PHP код:
new TotalPlayers,PlayerInGame[MAX_PLAYERS]; 
at the callback: OnPlayerDisconnect and in 'game leaving code'
PHP код:
if(PlayerInGame[playerid]) PlayerInGame[playerid] = 0TotalPlayers--; 
at the command or code/func where players join this minigame or whatever it is.
PHP код:
PlayerInGame[playerid] = 1TotalPlayers++; 
at the starting of this game code
PHP код:
if(TotalPlayers >= 2



Re: help plis - Sew_Sumi - 28.05.2018

What was a real good display of this, is manhunt-lv.pwn, which is in 0.2Xs server package. It had a minimum of 3 to join, before it would select a random player and make them hunted. The rest of the server was to chase them down and kill them.

You can get it here http://files.sa-mp.com/

Just be sure to download the client version and ONLY take the pwn out. Don't use the server package itself, simply use winrar to open it and get the pwn file alone from the gamemodes folder.

There's a few older gamemodes floating about, and they are an interesting read in some senses, just be wary that some of them may 'work' but because they are outdated it's possible they will bug if they aren't looked over.

Manhunt though, now that's stable as.