Szerző Téma: Rengetegszer spawnolás  (Megtekintve 619 alkalommal)

Rengetegszer spawnolás
« Dátum: 2012. július 08. - 17:55:12 »
0 Show voters
Helló!
Készítettünk egy TEK frakciót, minden rendben vele, mûködik, de mikor meghalok vagy belépek a játékba rengetegszer spawnol le, meg sem lehet mozdulni. Remélem van rá valamilyen gyógymód  :( (Házi  szerveren teszteltem)
A válaszokat elõre is köszönöm!
« Utoljára szerkesztve: 2012. július 08. - 18:51:05 írta Dommper »

Rengetegszer spawnolás
« Válasz #1 Dátum: 2012. július 08. - 18:13:20 »
0 Show voters
A public OnPlayerSpawn(playerid) be másolnád?

Rengetegszer spawnolás
« Válasz #2 Dátum: 2012. július 08. - 18:41:05 »
0 Show voters
Idézetet írta: ninjo98 date=1341764000\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"23992\" data-ipsquote-contentclass=\"forums_Topic
A public OnPlayerSpawn(playerid) be másolnád?
 

public OnPlayerSpawn(playerid)
{
//éhség
******
//vége
    SetPlayerToTeamColor(playerid);
    //SetPlayerColor(playerid,COLOR_GRAD2);
InitLockDoors(playerid);
STDPlayer[playerid] = 0;
/*gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}*/
if(gPlayerLogged[playerid] == 0)
{
       SendClientMessage(playerid, COLOR_LIGHTRED, \"Jelentkezz be mielõtt játszanál!\");
        KickPlayer[playerid] = 1;
}
if(gTeam[playerid] == 3)
{
    if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
    {
   //SendClientMessage(playerid, COLOR_LIGHTRED, \"You are part of a Family/Force, you\'ve been forced to the right Class + Char !\");
   MedicBill[playerid] = 0;
   new model = PlayerInfo[playerid][Munkaruha1];
   if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 30) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
   //else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
   //else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
            else if(PlayerInfo[playerid][pMember] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
            else if(PlayerInfo[playerid][pMember] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][szervLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   //else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   //else if(PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   //else if(PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
            else if(PlayerInfo[playerid][pLeader] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
            else if(PlayerInfo[playerid][pLeader] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
   Nevekki(playerid);
   SpawnPlayer(playerid);
}
}
if(PlayerInfo[playerid][Munkaruha1] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][Munkaruha1]); }
else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
SetPlayerWeapons(playerid);
SetPlayerSpawn(playerid);
SetPlayerToTeamColor(playerid);
PlayerFixRadio(playerid);
for(new i = 0; i < sizeof(Turfs); i++)
{
    GangZoneShowForPlayer(playerid, i, TurfInfo[zColor]);
    //GangZoneShowForPlayer(playerid, surenos, 0x4C5386AA);
    //GangZoneShowForPlayer(playerid, black_yakuza, 0x000000C2);
//GangZoneShowForPlayer(playerid, nortenos, 0x9D000096);
//GangZoneShowForPlayer(playerid, street_zone, 0x33AA33AA);
//GangZoneShowForPlayer(playerid, jefferson_saints, 0xD900D3C8);
        return 1;
}
if(MapIconsShown[playerid] != 1)
{
    MapIconsShown[playerid] = 1;
    for(new i = 0; i < sizeof(BizzInfo); i++)
{
   SetPlayerMapIcon(playerid,i + 1,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ],36,COLOR_LIGHTRED);
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
    SetPlayerMapIcon(playerid,i + 20,SBizzInfo[sbEntranceX],SBizzInfo[sbEntranceY],SBizzInfo[sbEntranceZ],36,COLOR_LIGHTRED);
}
}
return 1;
}
public CKLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/ck.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public PayLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/pay.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public KickLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/kick.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
//---------------------------LOGOK--------------------------------------
public RpPontLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/rppont.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public LoOoG(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/LoOoG.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
//-----------------------------------------------------------------
public WarnLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/warn.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public BanLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/ban.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public OnPlayerEnterCheckpoint(playerid)
{
new string[128];
new name[MAX_PLAYER_NAME];
if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
{
    TaxiAccepted[playerid] = 999;
GameTextForPlayer(playerid, \"~w~Kiértél az utashoz!\", 5000, 1);
TaxiCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}
/*else if(MedicCallTime[playerid] > 0)
{
    MedicAccepted[playerid] = 999;
GameTextForPlayer(playerid, \"~w~Kiértél a beteghez\", 5000, 1);
MedicCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
}*/
else if(MedicCallTime[playerid] > 0 /*&& RendorAccepted[playerid] < 999*/)
{
   DisablePlayerCheckpoint(playerid);
          GameTextForPlayer(playerid, \"~w~Kiértél a helyszínre\", 1001, 3);
    /*RendorAccepted[playerid] = 999;
GameTextForPlayer(playerid, \"~w~Kiértél a hívás helyszínére\", 5000, 1);
RendorCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
PlayerInfo[mentothiv] = 0;*/
for(new i=0; i<MAX_PLAYERS; i++)
    {
             if(IsPlayerConnected(i))
             {
                  if(PlayerInfo[pLeader] == 4 || PlayerInfo[pMember] == 4)
                  {
                     DisablePlayerCheckpoint(playerid);
                     PlayerInfo[mentothiv] = 0;
                     //SendClientMessage(i, COLOR_LIGHTBLUE, \"\");
               }
           }
    }
}
else if(RendorCallTime[playerid] > 0 )
{
      DisablePlayerCheckpoint(playerid);
                GameTextForPlayer(playerid, \"~w~Kiértél a helyszínre\", 1001, 3);
      for(new i=0; i<MAX_PLAYERS; i++)
           {
                 if(IsPlayerConnected(i))
                 {
                      if(PlayerInfo[pLeader] == 1 || PlayerInfo[pMember] == 1)
                      {
                         DisablePlayerCheckpoint(playerid);
                         PlayerInfo[rendorthiv] = 0;
                         //SendClientMessage(i, COLOR_LIGHTBLUE, \"\");
                   }
               }
           }
}
else if(MechanicCallTime[playerid] > 0 )
{
      DisablePlayerCheckpoint(playerid);
                GameTextForPlayer(playerid, \"~w~Kiértél a helyszínre\", 1001, 3);
      for(new i=0; i<MAX_PLAYERS; i++)
           {
                 if(IsPlayerConnected(i))
                 {
                      if(PlayerInfo[pLeader] == 17 || PlayerInfo[pMember] == 17)
                      {
                         DisablePlayerCheckpoint(playerid);
                         PlayerInfo[szerelothiv] = 0;
                         //SendClientMessage(i, COLOR_LIGHTBLUE, \"\");
                   }
               }
           }
}
/*   else if(MechanicCallTime[playerid] > 0 && MechanicAccepted[playerid] < 999)
{
    MechanicAccepted[playerid] = 999;
GameTextForPlayer(playerid, \"~w~Kiértél a hívás helyszínére\", 5000, 1);
MechanicCallTime[playerid] = 0;
DisablePlayerCheckpoint(playerid);
....

 

Dupla hozzászólás automatikusan összefûzve. ( 2012. július 08. - 18:51:17 )

Közbe megoldódott  :D
« Utoljára szerkesztve: 2012. július 08. - 18:51:17 írta Dommper »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal