gdje greska

Započeo MosT_WanteD, Avgust 16, 2010, 12:13:42 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

public OnPlayerSpawn(playerid)
{
   if (gdebug >=1){printf("OnPlayerSpawn Playerid:-1417.0,-295.8,14.1", playerid);}
   if (teamcarlock)
   {
      TeamLockDoors(playerid);
   }
   InitLockDoors(playerid);
   if(accountplay)
   {
      if (gdebug >=1){printf("accountplay");}
      if (gPlayerAccount[playerid] == 0)
      {
         gTeam[playerid] = 0;
         GameTextForPlayer(playerid, "~w~Dobrodosli na CrazY BalkaN [DM].~n~za igranje molimo kreirajte account, upisi ~n~~r~/regnick (password)~w~ za registraciju", 20000, 3);
         //SetPlayerInterior(playerid,0);
         SetPlayerInterior(playerid,3);
         PlayerInfo[playerid][pInt] = 3;
         SetPlayerPos(playerid,-1417.0,-295.8,14.1);
         // airport
         PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
         gPlayerSpawned[playerid] = 1;
         return 1;
      }
      if (gPlayerLogged[playerid] == 0)
      {
         gTeam[playerid] = 0;
         GameTextForPlayer(playerid, "~w~Za igranje se trebas logirati, upisis ~n~~g~/login (password)~w~ da se logiras na server", 20000, 3);
         //SetPlayerInterior(playerid,0);
         SetPlayerInterior(playerid,3);
         PlayerInfo[playerid][pInt] = 3;
         SetPlayerPos(playerid,-1417.0,-295.8,14.1);
         // airport
         PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
         gPlayerSpawned[playerid] = 1;
         return 1;
      }
   }
   if (gPlayerSpawned[playerid] == 0)
   {
      gTeam[playerid] = PlayerInfo[playerid][pTeam];
      if (gTeam[playerid] == 2 && forceteam && CopCheck(playerid))
      {
         gTeam[playerid] = 3;
         PlayerInfo[playerid][pTeam] = 3;
         SetPlayerRandomSpawn(playerid);
         SendClientMessage(playerid, COLOR_YELLOW, "CrazY BalkaN [DM]: Nije ti dozvoljeno da budes policajac.");
      }
      if (gTeam[playerid] == 1 && forceteam && MedCheck(playerid))
      {
         gTeam[playerid] = 3;
         PlayerInfo[playerid][pTeam] = 3;
         SetPlayerRandomSpawn(playerid);
         SendClientMessage(playerid, COLOR_YELLOW, "CrazY BalkaN [DM]: Nije ti dozvoljeno da budes bolnicar.");
      }
      if (gTeam[playerid] == 4)
      {
         gTeam[playerid] = PlayerInfo[playerid][pTeam];
      }
      SetPlayerRandomSpawn(playerid);
      if (gdebug){printf("DEBUG id = %d gTeam = %d",playerid,gTeam[playerid]);}

   }
   return 1;
}
e vako sam iskriptao i kada udem na server porta me na centar mape tj ovdje http://yfrog.com/0fsamp018dip
Poslednja Izmena: Avgust 16, 2010, 12:16:04 POSLE PODNE od Ahmed
LOL

Hm, jel ti je pawno prijavio neku grešku/upozorenje u kodu? Ako jeste, možeš li je napisati?

ne nije nista ja udem i kad kucam /kill ili poginem nekako porta me na centar mape
Poslednja Izmena: Avgust 16, 2010, 12:48:26 POSLE PODNE od Ahmed
LOL

Aha, a ti želiš kada si mrtav da se spawnuješ na koordinatima: -1417.0,-295.8,14.1 ?

Onda ovde gore umesto:  if (gdebug >=1){printf("OnPlayerSpawn Playerid:-1417.0,-295.8,14.1", playerid);}

Probaj koristiti:

if(gdebug >= 1)
{
      SetPlayerPos(playerid,  -1417.0,-295.8,14.1);
}

Iako ne znam sta ti oznacava gdebug ali ok.

nece  :'( da nije do interiora jer ja kad udem s citom i idem teleport interijor porta me ovdje http://yfrog.com/0fsamp018dip
Poslednja Izmena: Avgust 16, 2010, 13:38:32 POSLE PODNE od Ahmed
LOL