SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 10/06/2010, 07:42 PM   #1
J.
Little Clucker
 
Join Date: Apr 2010
Posts: 21
Reputation: 0
Default [HELP]Arena for 2 players!!!!

Can anyone help me make this arena only allows two players compete dm. If another player wants to get a message "The arena is full"!

Thanks

Code:
if (strcmp(cmdtext,"/x1", true)==0)
	{
	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,1531.834,-1131.411,135.488);
    new pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "%s was to x1 (/x1)", pname);
    SendClientMessageToAll(COLOR_RED, string);
    GivePlayerWeapon(playerid,4,0);
    GivePlayerWeapon(playerid,26,500);
    GivePlayerWeapon(playerid,31,500);
    GivePlayerWeapon(playerid,24,500);
    GivePlayerWeapon(playerid,32,500);
	return 1;
	}
J. is offline  
Old 10/06/2010, 07:48 PM   #2
Niixie
Gangsta
 
Niixie's Avatar
 
Join Date: Aug 2008
Location: Denmark
Posts: 533
Reputation: 2
Default Re: [HELP]Arena for 2 players!!!!

Global: new Isx1Full;

Code:
if (strcmp(cmdtext,"/x1", true)==0)
{
    if(Isx1Full == 2)
    {
        SendClientMessage(playerid, COLOR_RED, "DM x1 is full!");
	}
	else
	{
		SetPlayerInterior(playerid,0);
		SetPlayerPos(playerid,1531.834,-1131.411,135.488);
    	new pname[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    	format(string, sizeof(string), "%s was to x1 (/x1)", pname);
    	SendClientMessageToAll(COLOR_RED, string);
    	GivePlayerWeapon(playerid,4,0);
    	GivePlayerWeapon(playerid,26,500);
    	GivePlayerWeapon(playerid,31,500);
    	GivePlayerWeapon(playerid,24,500);
    	GivePlayerWeapon(playerid,32,500);
        if(Isx1Full == 0) { Isx1Full = 1; } else { Isx1Full = 2; }
	}
	return 1;
}
Try that
__________________
Code:
 ____      __    __    __    ___       ___    __    ________
|    \    |  |  |  |  |  |  \   \     /   /  |  |  |   _____|
|     \   |  |  |  |  |  |   \   \_ _/   /   |  |  |  |
|  |\  \  |  |  |  |  |  |    \    |    /    |  |  |  |__
|  | \  \ |  |  |  |  |  |    /   _|_   \    |  |  |   __|
|  |  \  \|  |  |  |  |  |   /   /   \   \   |  |  |  |_____
|__|   \_____|  |__|  |__|  /___/     \___\  |__|  |________|
Niixie is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Map] [MAP] Juice DM Arena Crazy_Cena Maps 10 02/03/2011 09:40 PM
[AJUDA] ARENA judson diogo Português/Portuguese 5 18/03/2010 02:21 PM
Help with dm Arena Eazy_E214 Help Archive 3 02/10/2009 04:55 PM
ID? Arena with grass? urkiefly101 Help Archive 5 22/08/2009 12:16 PM


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.