Imam problem sa mijenjanjem skina.

Započeo Gaucho123, Septembar 26, 2018, 15:53:58 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Znaci dam nekom igracu lidera i pokrene war i kad ga neko kill u waru i vrati mu skin sa kojim se registrovao/prijavio
Dio skripte: Znaci dam nekom igracu lidera i vrati mu skin sa kojim se registrovao/prijavio
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Hitno ko moze pomoci ...
Poslednja Izmena: Septembar 26, 2018, 15:59:07 POSLE PODNE od StreXnajjakY

Problem(error/warning): Znaci dam nekom igracu lidera i pokrene war i kad ga neko kill u waru i vrati mu skin sa kojim se registrovao/prijavio jedino ako ode relog posle setanja lidera i kad se vrati onda nema problema.
Dio skripte: Znaci dam nekom igracu lidera i vrati mu skin sa kojim se registrovao/prijavio
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Hitno ko moze pomoci ...
[/quote]

Setaš mu skin u varijablu za skin što očigledno uradi i onda SetPlayerSkin(targetid, varijabla); vjerovatno je PlayerInfo[targetid][pSkin] tako nešto (da bolje shvatiš) i ispadne SetPlayerSkin(targetid, PlayerInfo[targetid][pSkin]);


Pa ne znam ja tvoj sistem kakav je, o bože iqa, kažem ti da igraču seta skin iz varijable koji je ako sam dobro shvatio tvoj problem.. gledaj malo koji mu skin seta pod SetPlayerSkin kad mu setaš lidera, respawna se i ostalo.

      PlayerInfo[target][pLider] = 0;
      PlayerInfo[target][pClan] = 0;
      PlayerInfo[target][pRank] = 0;
      PlayerInfo[target][pSkin] = 1;
      SetPlayerSkin(target,PlayerInfo[target][pSkin]);

Citat: StreXnajjakY poslato Septembar 26, 2018, 16:34:58 POSLE PODNE
      PlayerInfo[target][pLider] = 0;
      PlayerInfo[target][pClan] = 0;
      PlayerInfo[target][pRank] = 0;
      PlayerInfo[target][pSkin] = 1;
      SetPlayerSkin(target,PlayerInfo[target][pSkin]);
Po ovome tu ono mu makne lidera,clana i naravno rank i seta mu skin ID:1, jer to kada umre ili kada mu skines lidera?

Kad mu postavljam lidera.
[pawn]YCMD:postavilidera(playerid, params[],help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"[UB:RP] "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 5 && PlayerInfo[playerid][pVlidera] != 1) return SCM(playerid,-1,""BELA"[BG]"SRWBOJA"Samo Vlasnik!");
   new target, factionid, string[126];
   if(sscanf(params, "ud", target, factionid))
   {
      SCM(playerid,-1, ""SRWBOJA"United Brothers Pomoc | "CRVENA"/postavilidera [ID/Ime] [ID Org]");
      SCM(playerid, -1,""SIVA"(ID:1). "SRWBOJA"Los Santos Police Department");
      SCM(playerid,-1,""SIVA"(ID:2). "SRWBOJA"The Vinci Family");
      SCM(playerid,-1,""SIVA"(ID:3). "SRWBOJA"Black Dragon Triads");
      SCM(playerid,-1,""SIVA"(ID:4). "SRWBOJA"Grove Street Family");
      SCM(playerid,-1,""SIVA"(ID:5). "SRWBOJA"Ballas");
      SCM(playerid,-1,""SIVA"(ID:6). "SRWBOJA"Novinari");
      SCM(playerid,-1,""SIVA"(ID:7). "SRWBOJA"Sheriff");
      SCM(playerid,-1,""SIVA"(ID:8). "SRWBOJA"Parking Servis");
      SCM(playerid,-1,""SIVA"(ID:9). "SRWBOJA"Condor");
        SCM(playerid,-1,""SIVA"(ID:10). "SRWBOJA"Hitmen");
        SCM(playerid,-1,""SIVA"(ID:11). "SRWBOJA"Blue Lagoon");
        SCM(playerid,-1,""SIVA"(ID:12). "SRWBOJA"Vagos Gang");
        SCM(playerid,-1,""SIVA"(ID:13). "SRWBOJA"Da Naga Boys");
        SCM(playerid,-1,""SIVA"(ID:14). "SRWBOJA"Taxi");
        SCM(playerid,-1,""SIVA"(ID:15). "SRWBOJA"Yakuza");
        SCM(playerid,-1,""SIVA"(ID:16). "SRWBOJA"FBI");
        SCM(playerid,-1,""SIVA"(ID:17). "SRWBOJA"Black Cobra Corporation");
        SCM(playerid,-1,""SIVA"(ID:18). "SRWBOJA"Vatrogasci");
      SCM(playerid,-1,""SIVA"(ID:19). "SRWBOJA"DeathRow");
      SCM(playerid,-1,""SIVA"(ID:20). "SRWBOJA"Russian Mafia");
      SCM(playerid,-1,""SIVA"(ID:21). "SRWBOJA"La Cosa Nostra");
      SCM(playerid,-1,""SIVA"(ID:22). "SRWBOJA"Left Cosat Family");
      SCM(playerid,-1,""SIVA"(ID:23). "SRWBOJA"Big Cartel Bulls");
      return 1;
   }
   if(factionid < 0 || factionid > 23) return SendClientMessage(playerid, -1, ""CRVENA"[UB:RP] "SIVA"ne mozete ici ispod 0 i vise od 23!");
   if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1 ,""SIVA"Pogresan ID (Nije Online)!");
   if(factionid == PlayerInfo[target][pLider]) return SendClientMessage(playerid,-1, ""SIVA"ERROR: "CRVENA"Taj igrac je vec lider te organizacije!");
   if(factionid == 0)
   {
      PlayerInfo[target][pLider] = 0;
      PlayerInfo[target][pClan] = 0;
      PlayerInfo[target][pRank] = 0;
      PlayerInfo[target][pSkin] = 1;
      SetPlayerSkin(target, PlayerInfo[target][pSkin]);
      //PlayerTextDrawSetPreviewModel(playerid, SkinIgraca[playerid], GetPlayerSkin(playerid));
      //PlayerTextDrawShow(playerid, SkinIgraca[playerid]);
      SCMF(playerid,-1,""SRWBOJA"[UB:RP]  "BELA"Vlasnik %s vam je skinuo lidera!",GetName(playerid));
      format(string, sizeof(string), ""SRWBOJA"[UB:RP]  "BELA"Skinuli ste lidera igracu %s!", GetName(target));
      SendClientMessage(playerid, -1, string);
      format(string, sizeof(string), ""SRWBOJA"INFO | "BELA"Vlasnik %s je skinuo lidera igracu %s.", GetName(playerid), GetName(target));
      AdminGameMaster(-1, string);
      return 1;
   }
   PlayerInfo[target][pLider] = factionid; PlayerInfo[target][pClan] = factionid; PlayerInfo[target][pRank] = 6;
   if(factionid == 1) { PlayerInfo[target][pSkin] = 283; } //LS PD
   else if(factionid == 2) { PlayerInfo[target][pSkin] = 124; } //ITA MAFIA
   else if(factionid == 3) { PlayerInfo[target][pSkin] = 120; } //TRIADS
   else if(factionid == 4) { PlayerInfo[target][pSkin] = 271; } //GROVE
   else if(factionid == 5) { PlayerInfo[target][pSkin] = 296; } //BALLAS
   else if(factionid == 6) { PlayerInfo[target][pSkin] = 295; } //NOVINARI
   else if(factionid == 7) { PlayerInfo[target][pSkin] = 287; } //Sheriff
   else if(factionid == 8) { PlayerInfo[target][pSkin] = 16; } //Parking servis
   else if(factionid == 9) { PlayerInfo[target][pSkin] = 46; } //Condor
   else if(factionid == 10) { PlayerInfo[target][pSkin] = 163; } //HITMAN
   else if(factionid == 11) { PlayerInfo[target][pSkin] = 292; } //Blue Lagoon
   else if(factionid == 12) { PlayerInfo[target][pSkin] = 108; } //Vagos Gang
   else if(factionid == 13) { PlayerInfo[target][pSkin] = 124; } // Da Naga Boys
   else if(factionid == 14) { PlayerInfo[target][pSkin] = 187; } //TAXI
   else if(factionid == 15) { PlayerInfo[target][pSkin] = 120; } //Yakuza
   else if(factionid == 16) { PlayerInfo[target][pSkin] = 286; } //FBI
   else if(factionid == 17) { PlayerInfo[target][pSkin] = 249; } //BCC
   else if(factionid == 18) { PlayerInfo[target][pSkin] = 278; } //Vatrogasci
   else if(factionid == 19) { PlayerInfo[target][pSkin] = 120; } //Death Row
   else if(factionid == 20) { PlayerInfo[target][pSkin] = 163; } //Russian Mafia
   else if(factionid == 21) { PlayerInfo[target][pSkin] = 147; } //La Cosa Nostra
   else if(factionid == 22) { PlayerInfo[target][pSkin] = 46; } //Left Coast Family
   else if(factionid == 23) { PlayerInfo[target][pSkin] = 147; } //Big Cartel Bulls
   SetPlayerSkin(target, PlayerInfo[target][pSkin]);
   //PlayerTextDrawSetPreviewModel(playerid, SkinIgraca[playerid], GetPlayerSkin(playerid));
   //PlayerTextDrawShow(playerid, SkinIgraca[playerid]);
   format(string, sizeof(string), ""SRWBOJA"A | "BELA"Vlasnik %s vam je dao lidera organizacije %s!", GetName(playerid), ImeOrganizacije(factionid));
   SendClientMessage(target, -1, string);
   format(string, sizeof(string), ""SRWBOJA"A | "BELA"Vlasnik %s je dao lidera %s-u organizacije %s.", GetName(playerid), GetName(target), ImeOrganizacije(factionid));
   AdminGameMaster(-1, string);
   return 1;
}[/pawn]
Poslednja Izmena: Septembar 27, 2018, 17:25:34 POSLE PODNE od Bašovski