[POMOC] /exit

Započeo |Xeptic| Führer, April 26, 2011, 19:30:58 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Cyber testiram
Detaljan opis problema: Neradi komanda /Exit a neznam sto nevalja u njoj
Dio skripte: Evo jedan exit

if(newkeys == KEY_SECONDARY_ATTACK) // Ako igrac pritisne enter ili f  -->mozete umjesto KEY_SECONDARY_ATTACK staviti nesta drugo...npr.KEY_SPRINT
	{
	if( IsPlayerInRangeOfPoint( playerid, 3.0, 1194.9930,-913.2858,48.0625 ) ) // ako je  igrac blizu kordinata koje postavite
	{
	SetPlayerPos( playerid, 1192.7960,-916.9046,43.1854 ); // X, Y, Z - gde ce se igrac spawnati u interijer(kordinate interijera)
	SetPlayerInterior( playerid, 0 ); // ID interijera
	GameTextForPlayer( playerid, "Los Santos", 3000, 1 ); // Salje igracu nekakvu poruku
	return 1;
	}
	}

Neke slike/video za lakse dobivanje pomoci(neobavezno):



Samo je problem sto ima // Banka exit itd itd al nema za kuce pa ko ima cyber neka ako moze napravi za kuce exit.Bio bih zahvalan !

hahaha  :P
nema to veze nikakve sa tom komandom sto si dao!

Znam to je primjer exita .... zato sam stavio

Nisi mi jasan dajes primer u OnPlayerKeyStateChange a kazes da ti neradi /exit  :'(

Cyber opce nema exit komandu sto je problem.Pa ako moze netko da skine cyber ili nesto da je ovdje stavi .... ovo gore je samo primjer o exitu ... mislio sam da ce pomoci
Poslednja Izmena: April 26, 2011, 19:51:20 POSLE PODNE od Apokalipsa

Kod: c
   if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 1467.3046, -1009.9215, 26.8438))//Banka (koordinate ulaza)
        {
            SetPlayerPos(playerid, 246.6466, 107.6561, 1003.2188);//(koordinate izlaza, znaci dok je u int ili negde...)
            SetPlayerInterior(playerid,10);
        }
        if(IsPlayerInRangeOfPoint(playerid, 3, 1230.6512,-1381.3033,14.6209))//Crkva (koordinate ulaza)
        {
            SetPlayerPos(playerid, 387.4467, 2324.5640, 1889.5835);//(koordinate izlaza, znaci dok je u int ili negde...)
            SetPlayerInterior(playerid,11);
        }
        return 1;
    }
    
    if(strcmp(cmd, "/exit", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 246.6466, 107.6561, 1003.2188))//Banka (Koordinate izlaza negde u int)
        {
             SetPlayerPos(playerid, 1467.3046, -1009.9215, 26.8438);//(koordinate ulaza)
             SetPlayerInterior(playerid,0);
        }
        if(IsPlayerInRangeOfPoint(playerid, 3, 387.4467, 2324.5640, 1889.5835))//Crkva
        {
            SetPlayerPos(playerid, 1230.6512,-1381.3033,14.6209);//(koordinate ulaza)
            SetPlayerInterior(playerid,0);
        }
        return 1;
    }


ILI U ZCMD

Kod: c
   CMD:enter(playerid, params[])
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 1467.3046, -1009.9215, 26.8438))//Banka (koordinate ulaza)
        {
            SetPlayerPos(playerid, 246.6466, 107.6561, 1003.2188);//(koordinate izlaza, znaci dok je u int ili negde...)
            SetPlayerInterior(playerid,10);
        }
        if(IsPlayerInRangeOfPoint(playerid, 3, 1230.6512,-1381.3033,14.6209))//Crkva (koordinate ulaza)
        {
            SetPlayerPos(playerid, 387.4467, 2324.5640, 1889.5835);//(koordinate izlaza, znaci dok je u int ili negde...)
            SetPlayerInterior(playerid,11);
        }
        return 1;
    }
    
    CMD:exit(playerid, params[])
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 246.6466, 107.6561, 1003.2188))//Banka (Koordinate izlaza negde u int)
        {
             SetPlayerPos(playerid, 1467.3046, -1009.9215, 26.8438);//(koordinate ulaza)
             SetPlayerInterior(playerid,0);
        }
        if(IsPlayerInRangeOfPoint(playerid, 3, 387.4467, 2324.5640, 1889.5835))//Crkva
        {
            SetPlayerPos(playerid, 1230.6512,-1381.3033,14.6209);//(koordinate ulaza)
            SetPlayerInterior(playerid,0);
        }
        return 1;
    }
Poslednja Izmena: April 26, 2011, 19:53:14 POSLE PODNE od eXtreme

Jo jo jo xD

G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34825) : error 017: undefined symbol "TEAM_CYAN_COLOR"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34851) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34853) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34854) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34864) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34877) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34888) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34899) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34910) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34921) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34932) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34943) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34955) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34969) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34974) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34979) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34984) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34989) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34994) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34999) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(35004) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(35019) : error 017: undefined symbol "FamilyChatLog"

Omg...
To sigurno nije iz mog koda  :o
I bog zna sta si ti sve nalupao navrat na nos...
To treba polako da se prenosi a ne da nam se BUBNU SAMO ERRORI i da resavamo  :-*
Ja sam ti pomogao...

brate ti si meni dao za banku xD meni netreba za banku meni treba za kuce a cryber opce to nema.Kuzis?

Kod: c
CMD:enter(playerid, params[])  
{		
if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
				{
					//printf("Found House :%d",i);
					if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
					{
						SetPlayerInterior(playerid,HouseInfo[i][hInt]);
						SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
						GameTextForPlayer(playerid, "~w~dobrodosao doma", 5000, 1);
						PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
						PlayerInfo[playerid][pHouseEntered] = 1;
						PlayerInfo[playerid][pLocal] = i;
						PlayerInfo[playerid][pVW] = i;
						SetPlayerVirtualWorld(playerid,i);
					}
					else
					{
						GameTextForPlayer(playerid, "~r~zakljucano", 5000, 1);
					}
				}
			}
		}
}

A posto nisi dobro objasnio sta treba neces dobiti exit vec ces se potruditi da napravis SAM!

Samo trebam komandu /exit da lik kad udje u kucu da moze /exit samo to ...

CMD:exit(playerid, params[])  
{		
    if(IsPlayerConnected(playerid))
   {
       for(new i = 0; i < sizeof(HouseInfo); i++)
      {
          if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
          {
              SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
	PlayerInfo[playerid][pInt] = 0;
	PlayerInfo[playerid][pHouseEntered] = 0;
	PlayerInfo[playerid][pLocal] = i;
	PlayerInfo[playerid][pVW] = i;
	SetPlayerVirtualWorld(playerid,0);
          }
        }
     }
}

Neznam da li radi probaj  :D


Edit:

TESTIRANO RADI!
PS. Meni radi izlaz i na enter  :o
Poslednja Izmena: April 26, 2011, 22:26:09 POSLE PODNE od eXtreme

Citat: eXtreme poslato April 26, 2011, 22:06:37 POSLE PODNE
CMD:exit(playerid, params[])  
{		
    if(IsPlayerConnected(playerid))
   {
       for(new i = 0; i < sizeof(HouseInfo); i++)
      {
          if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
          {
              SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
	PlayerInfo[playerid][pInt] = 0;
	PlayerInfo[playerid][pHouseEntered] = 0;
	PlayerInfo[playerid][pLocal] = i;
	PlayerInfo[playerid][pVW] = i;
	SetPlayerVirtualWorld(playerid,0);
          }
        }
     }
}

Neznam da li radi probaj  :D


Edit:

TESTIRANO RADI!
PS. Meni radi izlaz i na enter  :o

Mozes li mi reci gde to samo da ubacim>?

Msm jedino na Cyber.kucas na CTRL+F ZCMD i ispod zelenog teksta stavis to  8)!

Citat: Apokalipsa poslato April 26, 2011, 19:58:18 POSLE PODNE
Jo jo jo xD

G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34825) : error 017: undefined symbol "TEAM_CYAN_COLOR"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34851) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34853) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34854) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34864) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34877) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34888) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34899) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34910) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34921) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34932) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34943) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34955) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34969) : error 017: undefined symbol "pMember"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34974) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34979) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34984) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34989) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34994) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(34999) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(35004) : error 017: undefined symbol "pLeader"
G:\RedLine Test Server\Cyb3r RolePlay [0.3c]\gamemodes\CYBER.pwn(35019) : error 017: undefined symbol "FamilyChatLog"

Prvo nemas tu boju definiranu stavi neku svoju.
onda pMember moras ovako pod
enum pInfo

pMember,
tako i pLeader, i eto :)