[POMOC]Kako kapije da se pomjeraju

Započeo [CH]Rony, Mart 03, 2013, 14:28:37 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Mode koji koristite:City life RP:
Opis problem:Znaci ovako stavim u MTA 2 objekta prvi gate zatvoren drugi gate otvoren i onda napravim ono da se pomice itd i stavim npr za kucu na WV da moze otvorit clan UR-a jer mi je definiran mod tako sad cu ti paste:
Neki dio skripte/slika/video (da laške dobijete pomoć)::


Includsi moji:
Kod: [Izaberi]
#include <a_samp>
#include <foreach>
#include <streamer>
#include <sscanf2>
#include <YSI\y_ini>
#include <YSI\y_commands>



Define UR clan lider:
Kod: [Izaberi]
//----------Rankovi------------------
#define UR_LIDER 217
#define UR_RANK1 29
I evo komande za UR bazu:
Kod: [Izaberi]
//------------------------------------------------------------------------------
YCMD:otvori(playerid, params[], help)
{
   #pragma unused help
   #pragma unused params
   if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
   {
      if(IsPlayerInRangeOfPoint(playerid, 5.0, 1418.69995117,-1649.69995117,16.20000076))
      {
         SCM(playerid,CRVENA, "{BFC0C2}|KAPIJA|{FFFFFF} Otvorili ste kapiju na UR Bazi.");
         MoveObject(urkapija1, 1418.80004883,-1657.59997559,16.20000076, 2);
      }
   }
   if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
   {
      if(IsPlayerInRangeOfPoint(playerid, 5.0, 1369.8766,-1697.6552,9.5404))
      {
         SCM(playerid,CRVENA, "{BFC0C2}|KAPIJA|{FFFFFF} Otvorili ste kapiju za tunel na UR Bazi.");
         MoveObject(urkapija2, 1369.59997559,-1699.19995117,17.79999924, 2);
      }
   }
   return 1;
}
//------------------------------------------------------------------------------
YCMD:zatvori(playerid, params[], help)
{
   #pragma unused help
   #pragma unused params
   if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
   {
       if(IsPlayerInRangeOfPoint(playerid, 5.0, 1418.69995117,-1649.69995117,16.20000076))
       {
         SCM(playerid,CRVENA, "{BFC0C2}|KAPIJA|{FFFFFF} Zatvorili ste kapiju na UR Bazi.");
         MoveObject(urkapija1, 1418.69995117,-1649.69995117,16.20000076, 2);
      }
   }
   if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 6)
   {
       if(IsPlayerInRangeOfPoint(playerid, 5.0, 1369.8766,-1697.6552,9.5404))
       {
         SCM(playerid,CRVENA, "{BFC0C2}|KAPIJA|{FFFFFF} Zatvorili ste kapiju za tunel na UR Bazi.");
         MoveObject(urkapija2, 1369.59997559,-1699.19995117,11.89999962, 2);
      }
   }
   return 1;
}


E i sad ja sam gledoa vilage turtorial stavio sam sve i idem isplayerinfo(playerid[pclan]==1 onda stavim dalje i sad neznan ako mozes vidit jel on koristi isti procesor ili ZCMD jer rekli su mi da mi je ovi ycmd bolji ?


Daj mi točne koordinate otvorene i zatvorene kapije samo pa ću ti dat kod kako treba izgledati .. I kada stavljaš funkcije stavi ih u kod ne ovako nepregledno je
Poslednja Izmena: Mart 03, 2013, 15:11:25 POSLE PODNE od FlasH
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N


CreateObject(2933, 1245.5, -767.29999, 92.8, 0, 0, 0);//otvorena
CreateObject(2933, 1245.5, -767.29999, 96.9, 0, 0, 0);//zatvorena


Znaci na move object misto onog stavim kosto si ti ? ovo 2 je move speed ?


C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(124) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(1025) : warning 219: local variable "kapija" shadows a variable at a preceding level
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(1028) : warning 204: symbol is assigned a value that is never used: "kapija"
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(2502) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(2502) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Evo malo sam popravlja sam skontavao znaci dosao sam na 1 error ovo je sto sam stavio za komandu sta vamo nevalja


YCMD:kapija(playerid, params[], help)
{
#pragma unused help
#pragma unused params
  if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) ||
   {
         SCM(playerid,CRVENA, "{BFC0C2}|kapija|{FFFFFF} Otvorili ste kapiju na Vili.");
         MoveObject(kapija,2933, 1245.5, -767.29999, 2);//otvorena
      }







new kapija; na vrh moda sam stavio
onda pod on game mode init sam stavio isto tako kapija==create object bla bla //otvorena i defina i tamo kako dalje ? i jel ono gori di pise kapija jel to komanda za to ?
Poslednja Izmena: Mart 03, 2013, 19:07:54 POSLE PODNE od [CH]Rony


C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(124) : error 001: expected token: ";", but found "new"
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(1025) : warning 219: local variable "kapija" shadows a variable at a preceding level
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(1028) : warning 204: symbol is assigned a value that is never used: "kapija"
C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(2502) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Linija: 124 na kraju dodaj ";"

I 1025 obriši "new kapija;"
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

C:\Documents and Settings\mateo\Desktop\City_Life_RolePlay_v5.0_0.3x\gamemodes\CLRP.pwn(2503) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Zadnji error ?


Ma jednostavno smao definises na pocetku npr new vwkapija;
pod create object uradis
vwkapija == createobject.....
u komandi moveobject i gdje hoces da se pomjera kapija.. i to bi iblo to vidi u clrp ti ima /otvori pokusaj skontat prkeo te komande

Evo ti ovo sada sam se sjetio ovog programa,evo ko stvoren za tebe

http://www.youtube.com/watch?v=3vfTNu_ZJkA&feature=youtu.be
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

Netriaju mi youtube sranja nego nek mi neko rjesi zadnji error


Citat: [CH]Rony poslato Mart 03, 2013, 22:26:40 POSLE PODNE
Netriaju mi youtube sranja nego nek mi neko rjesi zadnji error

Ma to je program uneses koordinate i dobis svoj kod.
Daj tu liniju di se nalazi error,kao sto ti je reko decko gore.
Poslednja Izmena: Mart 03, 2013, 22:31:36 POSLE PODNE od FlasH
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

YCMD:kapija(playerid, params[], help)
{
#pragma unused help
#pragma unused params
  if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid) ||
 
   {
   SCM(playerid,CRVENA, "{BFC0C2}|kapija|{FFFFFF} Otvorili ste kapiju na Vili.");
         MoveObject(kapija,2933, 1245.5, -767.29999, 2);//otvorena;
      }


Ovako:

YCMD:kapija(playerid, params[], help)
{
        #pragma unused help
#pragma unused params
if(PlayerInfo[playerid][pClan] == 1 || PlayerInfo[playerid][pLider] == 1 || IsPlayerAdmin(playerid))
{
          SCM(playerid,CRVENA, "{BFC0C2}|kapija|{FFFFFF} Otvorili ste kapiju na Vili.");
          MoveObject(kapija,2933, 1245.5, -767.29999, 2);//otvorena;
        }
        return 1;
}
Poslednja Izmena: Mart 04, 2013, 16:47:13 POSLE PODNE od FlasH
BIG RESPEKT: Blaeks,  [CRP] Joey_, David (Sabljak) A.k.A SABO(T), joXy_, Dimi, Sexserghy ♥, TerminuS, H1TM4N

Sve je u redu u Y_Ini formatu e sad mozes mi to dati za zcmd ja sve napravim isto skoro al mi nece da radi.


C:\Documents and Settings\mateo\Desktop\Croatia Sky RolePlay\gamemodes\CSRP.pwn(15) : fatal error 100: cannot read from file: "morphinc"

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


1 Error.