Pitanje o OnKeyStateChange

Započeo Jiky, April 14, 2020, 02:52:29 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning):Pitanje
Dio skripte: [ pawn ]Bice dolje[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]//[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_SECONDARY_ATTACK)
	{
	    if(IsPlayerInRangeOfPoint(playerid,2.0,-2103.8525,-2342.0149,30.6172)) // 24/7
	    {
	        SetPlayerInterior(playerid,17);
	        SetPlayerPos(playerid,-25.884498,-185.868988,1003.546875);
	        SetCameraBehindPlayer(playerid);
	        SendClientMessage(playerid,COLOR_WHITE,"[MARKET]{33CCFF}Dobrodosli!");
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0,-25.884498,-185.868988,1003.546875))
		{
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,-2103.8525,-2342.0149,30.6172);
		    SetCameraBehindPlayer(playerid);
		    SendClientMessage(playerid,COLOR_WHITE,"[MARKET]{33CCFF}Dovidjenja!");
		}
////////////////////////////////////////////////////////////////////////////////
		if(IsPlayerInRangeOfPoint(playerid,2.0,-2155.3093,-2460.1584,30.8516)) // Clucking Bell
	    {
	        SetPlayerInterior(playerid,9);
	        SetPlayerPos(playerid,365.0037,-10.3934,1001.8516);
	        SetCameraBehindPlayer(playerid);
	        SendClientMessage(playerid,COLOR_WHITE,"[Cluckin'Bell]{33CCFF}Dobrodosli!");
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0,365.0037,-10.3934,1001.8516))
		{
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,-2155.3093,-2460.1584,30.8516);
		    SetCameraBehindPlayer(playerid);
		    SendClientMessage(playerid,COLOR_WHITE,"[Cluckin'Bell]{33CCFF}Dovidjenja!");
		}
////////////////////////////////////////////////////////////////////////////////
		if(IsPlayerInRangeOfPoint(playerid,2.0,-2161.5972,-2385.1460,30.7722))
	    {
	        SetPlayerInterior(playerid,10);
	        SetPlayerPos(playerid,246.375991,109.245994,1003.218750);
	        SetCameraBehindPlayer(playerid);
	        SendClientMessage(playerid,COLOR_WHITE,"[POLICIJA]{33CCFF}Dobrodosli!");
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0,246.375991,109.245994,1003.218750))
		{
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,-2161.5972,-2385.1460,30.7722);
		    SetCameraBehindPlayer(playerid);
		    SendClientMessage(playerid,COLOR_WHITE,"[POLICIJA]{33CCFF}Dovidjenja!");
		}
////////////////////////////////////////////////////////////////////////////////
		if(IsPlayerInRangeOfPoint(playerid,2.0,-2057.3828,-2464.5171,31.1797))
		{
 			SetPlayerInterior(playerid,5);
   			SetPlayerPos(playerid,318.564971,1118.209960,1083.882812);
			SetCameraBehindPlayer(playerid);
  			SendClientMessage(playerid,COLOR_WHITE,"[VAGOS]{33CCFF}Dobrodosao homie!");
		}
		if(IsPlayerInRangeOfPoint(playerid,2.0,318.5820,1114.6663,1083.8828))
		{
 			SetPlayerInterior(playerid,0);
   			SetPlayerPos(playerid,-2057.3828,-2464.5171,31.1797);
   			SetCameraBehindPlayer(playerid);
	    	SendClientMessage(playerid,COLOR_WHITE,"[VAGOS]{33CCFF}Dovidjenja homie!");
    	}
////////////////////////////////////////////////////////////////////////////////
		if(IsPlayerInRangeOfPoint(playerid,2.0,-2201.0295,-2341.2717,30.6250))
	    {
	        SetPlayerInterior(playerid,3);
	        SetPlayerPos(playerid,2260.4524,-682.9071,1320.5079);
	        SetCameraBehindPlayer(playerid);
	        SendClientMessage(playerid,COLOR_WHITE,"[TRIADS]{33CCFF}Dobrodosao!");
		}
		else if(IsPlayerInRangeOfPoint(playerid,2.0,2260.4524,-682.9071,1320.5079))
		{
		    SetPlayerInterior(playerid,0);
		    SetPlayerPos(playerid,-2201.0295,-2341.2717,30.6250);
		    SetCameraBehindPlayer(playerid);
		    SendClientMessage(playerid,COLOR_WHITE,"[TRIADS]{33CCFF}Dovidjenja!");
		}
////////////////////////////////////////////////////////////////////////////////


zanemarite cluckin bell i 24/7.. interesuje me kako da ne da druge klase ne ulaze u ent jedne klase..
npr PD i Triade mogu uci u ent Vagosa a ja to necu?
zanima me kako da fix to..
Pokusao sam naci na netu.. nije bilo
Probao sam sam , napraVio 100 bugoVa.. :(

Primjer
if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)
AKO ZNAS ZA BOGA I ZA GLAVU ZIVU NE BRANI MI DOKTORE RAKIJU I PIVU

Citat: .lestra poslato April 14, 2020, 12:02:28 POSLE PODNE
Primjer
if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1)

nisu to organizacije.. to su klase
gTeam koristim...
CnR/DM je srw

      if(IsPlayerInRangeOfPoint(playerid,2.0,-2201.0295,-2341.2717,30.6250))
       {
            if(gTeam[playerid] == TEAM_TRIADS)
         {
           SetPlayerInterior(playerid,3);
           SetPlayerPos(playerid,2260.4524,-682.9071,1320.5079);
           SetCameraBehindPlayer(playerid);
           SendClientMessage(playerid,COLOR_WHITE,"[TRIADS]{33CCFF}Dobrodosao!");
           }
      }
      else if(IsPlayerInRangeOfPoint(playerid,2.0,2260.4524,-682.9071,1320.5079))
      {
            if(gTeam[playerid] == TEAM_TRIADS)
            {
          SetPlayerInterior(playerid,0);
          SetPlayerPos(playerid,-2201.0295,-2341.2717,30.6250);
          SetCameraBehindPlayer(playerid);
          SendClientMessage(playerid,COLOR_WHITE,"[TRIADS]{33CCFF}Dovidjenja!");
          }
      }
Poslednja Izmena: April 14, 2020, 14:44:03 POSLE PODNE od .lestra
AKO ZNAS ZA BOGA I ZA GLAVU ZIVU NE BRANI MI DOKTORE RAKIJU I PIVU