help whit this
#1

So i have this

Код:
//---------------------------------[LCS]-----------------------------------------
	if(strcmp(cmd, "/gotolcs", true) == 0) //
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if (GetPlayerState(playerid) == 2)
				{
					new tmpcar = GetPlayerVehicleID(playerid);
					SetVehiclePos(tmpcar, -1038.3295, -1030.3242, 129.2119);
					TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
					LinkVehicleToInterior(tmpcar, 0);
					SetPlayerVirtualWorld(playerid, 0);
				}
				else
				{
					SetPlayerPos(playerid, -1035.0485, -1030.0416, 129.3460);
					SetPlayerVirtualWorld(playerid, 0);
				}
    			SendClientMessage(playerid, COLOR_GRAD1, "You have Been Teleported");
    			SendClientMessage(playerid, COLOR_NICERED, "Welcome to the Lcs Area.");
    			SetPlayerInterior(playerid,0);
				DisablePlayerCheckpoint(playerid);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command!");
				return 1;
			}
		}
		return 1;
	}

	if(strcmp(cmd, "/openlcs", true) == 0) // By CuervO_NegrO
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pDM] < 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command.");
                return 1;
            }
            SendClientMessageToAll(TEAM_GROVE_COLOR, "PlayZone Server LCS is now OPEN!");
			SendClientMessageToAll(TEAM_GROVE_COLOR, "We have only 30 slots so hurry up");
		}
		return 1;
	}

if(strcmp(cmd,"/lcscount",true) == 0 || strcmp(cmd,"/lcscd",true) == 0) // By CuervO_NegrO
	{
		if(PlayerInfo[playerid][pDM] == 1)
		{
		    for(new i = 0; i < MAX_PLAYERS; i++)
		    if(PlayerInfo[i][pDTK] == 1 || IsPlayerInRangeOfPoint(i,250, -1035.0485, -1030.0416, 129.3460))
  			{
  			    SetTimer("DD1", 1000, false);
       			SetTimer("DD2", 2000, false);
       			SetTimer("DD3", 3000, false);
       			SetTimer("DD4", 4000, false);
       			SetTimer("DD5", 5000, false);
       			SetTimer("DD6", 6000, false);
			}

		}
		return 1;
	}
//---------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------
    if(strcmp(cmd, "/lcsrights", true) == 0) // By CuervO_NegrO
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "{D580FE}Foloseste:{FFFFFF} /ddrights [playerid/PartOfName] [level](0-1)");
				return 1;
			}
			new playa;
			new level;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			level = strval(tmp);
			if(PlayerInfo[playerid][pAdmin] >= 1338)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			            //ConsumingMoney[playa] = 1;
			            if(level < 0||level > 1) { SendClientMessage(playerid, COLOR_GREY, "** Level May not be below 0 or above 1!"); return 1; }

			            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						PlayerInfo[playa][pDM] = level;
						format(string, sizeof(string), "** Gave to %s LCS Manager Level [%d]",giveplayer,level);
						SendClientMessage(playerid, COLOR_ORANGE, string);
						format(string, sizeof(string), "~b~-LCS- ~n~~w~You Have Now Level ~y~%d ~n~~w~At the ~p~Official LCS Managers Team",level);
						GameTextForPlayer(playa, string, 4500,3);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "** Nu ai dreptul de a utiliza aceasta comanda!");
			}
		}
		return 1;
	}


	if(strcmp(cmd, "/lcsHelp", true) == 0) // By CuervO_NegrO
	{
		if(IsPlayerConnected(playerid))
		{
		    if(PlayerInfo[playerid][pAdmin] < 4 && PlayerInfo[playerid][pDM] == 0)
		    {
		        SendClientMessage(playerid, COLOR_LIGHTRED, "You do not have Authorization to use this Command!");
		        return 1;
			}
			SendClientMessage(playerid, COLOR_YELLOW, "----------------------- LCS Help -----------------------");
  			SendClientMessage(playerid, COLOR_WHITE, "To go to  LCS  Type: /gotolcs");
			SendClientMessage(playerid, COLOR_WHITE, "To Send a LCS  Opening Message Type: /LCS");

		}
		return 1;
	}
and here i want to make another comant
/joinlcs
that only when lcs is open the player can join whitout freeze

So what can i do ?
Reply
#2

https://sampwiki.blast.hk/wiki/Function:...erControllable
pawn Код:
just make the command setting the in the position of event is
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)