[POMOC]Spawn

Započeo |Xeptic| Führer, Februar 11, 2011, 20:44:18 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Evo ako mi moze netko samo nesto reci... ja hocu promijenit di se igrac spawna znaci ide register login obradi sve ono.. i onda se spawna e to di se spawna zelim promijeniti pa evo public OnPlayerSpawn cijeli



public OnPlayerSpawn(playerid)
{
    /*if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
        if(!strcmp(npcname, "Bus_Driver1", true)) //Checking if the NPC's name is MyFirstNPC
        {
            PutPlayerInVehicle(playerid, NpcVozilo0, 178); //Putting the NPC into the vehicle we created for it.
            return 1;
        }
        if(!strcmp(npcname, "Bus_Driver0", true))
        {
            PutPlayerInVehicle(playerid, NpcVozilo1, 179);
            return 1;
        }
        return 1;
    }*/
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 && IsPlayerNPC(playerid) != 1)
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "** Ovaj server zahtjeva prvo da se prijavite prije spawnanja (Kikovan) **");
        KickPlayer[playerid] = 1;
}
if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
{
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste prihvaceni Lider, sada ste civil !");
PlayerInfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 5)
{
    if(PlayerInfo[playerid][pMember] < 1)
    {
        MedicBill[playerid] = 0;
        new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan Organizacije, sada ste civil !");
PlayerInfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 10)
{
    if(PlayerInfo[playerid][pMember] != 8)
    {
        MedicBill[playerid] = 0;
        new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan ove agencije, sada ste civil !");
PlayerInfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
            SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
}
if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
{
    MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste se prijavili za Policiju / FBI / SWAT, sada ste civil !");
PlayerInfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playerid][pModel] = CIV[rand];
SpawnPlayer(playerid);
}
if(gTeam[playerid] == 3)
{
    if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
    {
SendClientMessage(playerid, COLOR_LIGHTRED, "Niste clan Org, premjesteni ste na odgovarajucu Klasu + Char !");
MedicBill[playerid] = 0;
new model = PlayerInfo[playerid][pChar];
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] == 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][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][pLeader] == 5) { 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; }
//SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
}
if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
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[i][zColor]);
    GangZoneShowForPlayer(playerid, crips, 0x2641FEAA);
GangZoneShowForPlayer(playerid, bloods, 0xAA3333AA);
if(gangzona[gzona1] == 0){GangZoneShowForPlayer(playerid,zona1,0xC0C0C096);}
else if(gangzona[gzona1] == 1){GangZoneShowForPlayer(playerid,zona1,0x2641FEAA);}
else if(gangzona[gzona1] == 2){GangZoneShowForPlayer(playerid, zona1, 0xAA3333AA);}
if(gangzona[gzona2] == 0){GangZoneShowForPlayer(playerid,zona2,0xC0C0C096);}
else if(gangzona[gzona2] == 1){GangZoneShowForPlayer(playerid,zona2,0x2641FEAA);}
else if(gangzona[gzona2] == 2){GangZoneShowForPlayer(playerid, zona2, 0xAA3333AA);}
if(gangzona[gzona3] == 0){GangZoneShowForPlayer(playerid,zona3,0xC0C0C096);}
else if(gangzona[gzona3] == 1){GangZoneShowForPlayer(playerid,zona3,0x2641FEAA);}
else if(gangzona[gzona3] == 2){GangZoneShowForPlayer(playerid, zona3, 0xAA3333AA);}
if(gangzona[gzona4] == 0){GangZoneShowForPlayer(playerid,zona4,0xC0C0C096);}
else if(gangzona[gzona4] == 1){GangZoneShowForPlayer(playerid,zona4,0x2641FEAA);}
else if(gangzona[gzona4] == 2){GangZoneShowForPlayer(playerid, zona4, 0xAA3333AA);}
if(gangzona[gzona5] == 0){GangZoneShowForPlayer(playerid,zona5,0xC0C0C096);}
else if(gangzona[gzona5] == 1){GangZoneShowForPlayer(playerid,zona5,0x2641FEAA);}
else if(gangzona[gzona5] == 2){GangZoneShowForPlayer(playerid, zona5, 0xAA3333AA);}
if(gangzona[gzona6] == 0){GangZoneShowForPlayer(playerid,zona6,0xC0C0C096);}
else if(gangzona[gzona6] == 1){GangZoneShowForPlayer(playerid,zona6,0x2641FEAA);}
else if(gangzona[gzona6] == 2){GangZoneShowForPlayer(playerid, zona6, 0xAA3333AA);}
        return 1;
}


   
if(MapIconsShown[playerid] != 1)
{
    MapIconsShown[playerid] = 1;
    for(new i = 0; i < sizeof(BizzInfo); i++)
{
SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED);
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
    SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED);
}
}
return 1;
}




ÄŒitaj pravila, lock
Skripta koju koristim:
Detaljan opis problema:
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):