05.09.2012, 14:52
Ayuda D: tengo un problema Catastrуfico y no entiendo el porque! bueno os explico... Yo hostie mi servidor en un hosting samp, monte todo normalmente.. bueno pero no entiendo porque aparecio este bug, la Faccion numero 5 y 14, los que sean lideres de esas facciones al usar /invitar con un player, lo invita normal, pero cuando ese player pone /cuenta crashea el Server.. y cierra el host D: ayudenme no se porque.. con esas dos! Aqui les dejo el cmd para ver si tiene un Error ._.
pawn Код:
if(strcmp(cmd, "/invitar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /invitar [ID | Nombre]");
return 1;
}
new para1;
new ftext[128];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
{
//====================================[ Skin de las facciones] ====================================
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "SAPD"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); }
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FR"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "SAMD"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Mara Salvatrucha13"; ChosenSkin[para1] = 116; SetPlayerSkin(para1, 116); }//Esta es la que da crash
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "Gobierno de LS"; ChosenSkin[para1] = 66; SetPlayerSkin(para1, 66); }
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "INS"; ChosenSkin[para1] = 165; SetPlayerSkin(para1, 165); }
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Estudio LSTV"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Crazy Motor's"; ChosenSkin[para1] = 50; SetPlayerSkin(para1, 50); }
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Compaсia de Taxis"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 5; ftext = "Familia Bratva"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 5; ftext = "Policia Frontera"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 258); } //esta tambien da crash D:
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Cripz"; ChosenSkin[para1] = 293; SetPlayerSkin(para1, 293); }
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Banqueros"; ChosenSkin[para1] = 7; SetPlayerSkin(para1, 7); }
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Kings of Shadows"; ChosenSkin[para1] = 109; SetPlayerSkin(para1, 109); }
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Bloodz"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "XStreyatus"; ChosenSkin[para1] = 100; SetPlayerSkin(para1, 100); }
else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Solt Of The Lost"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 12; ftext = "Prostituta"; ChosenSkin[para1] = 90; SetPlayerSkin(para1, 90); }
else if(PlayerInfo[playerid][pLeader] == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 12; ftext = "Barzini"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[playerid][pLeader] == 23) { PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 12; ftext = "Criminals Th18"; ChosenSkin[para1] = 30; SetPlayerSkin(para1, 30); }
else if(PlayerInfo[playerid][pLeader] == 24) { PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 12; ftext = "Cartel Red"; ChosenSkin[para1] = 123; SetPlayerSkin(para1, 123); }
else if(PlayerInfo[playerid][pLeader] == 25) { PlayerInfo[para1][pTeam] = 25; gTeam[para1] = 12; ftext = "Fuerza Naval"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(PlayerInfo[playerid][pLeader] == 26) { PlayerInfo[para1][pTeam] = 26; gTeam[para1] = 12; ftext = "Fuerza Aerea"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
else if(PlayerInfo[playerid][pLeader] == 27) { PlayerInfo[para1][pTeam] = 27; gTeam[para1] = 12; ftext = "Medicos SF"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
else if(PlayerInfo[playerid][pLeader] == 28) { PlayerInfo[para1][pTeam] = 28; gTeam[para1] = 12; ftext = "Ladrones LV"; ChosenSkin[para1] = 26; SetPlayerSkin(para1, 26); }
else if(PlayerInfo[playerid][pLeader] == 29) { PlayerInfo[para1][pTeam] = 29; gTeam[para1] = 12; ftext = "Estudio SFTV"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
else if(PlayerInfo[playerid][pLeader] == 30) { PlayerInfo[para1][pTeam] = 30; gTeam[para1] = 12; ftext = "Los Chilliad"; ChosenSkin[para1] = 224; SetPlayerSkin(para1, 224); }
else if(PlayerInfo[playerid][pLeader] == 31) { PlayerInfo[para1][pTeam] = 31; gTeam[para1] = 12; ftext = "Alcalde [LS/SF]"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
else if(PlayerInfo[playerid][pLeader] == 32) { PlayerInfo[para1][pTeam] = 32; gTeam[para1] = 12; ftext = "Yakuza [SF]"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 120); }
else if(PlayerInfo[playerid][pLeader] == 33) { PlayerInfo[para1][pTeam] = 33; gTeam[para1] = 12; ftext = "Torino"; ChosenSkin[para1] = 299; SetPlayerSkin(para1, 299); }
else if(PlayerInfo[playerid][pLeader] == 34) { PlayerInfo[para1][pTeam] = 34; gTeam[para1] = 12; ftext = "Need For Speed"; ChosenSkin[para1] = 158; SetPlayerSkin(para1, 158); }
else if(PlayerInfo[playerid][pLeader] == 35) { PlayerInfo[para1][pTeam] = 35; gTeam[para1] = 12; ftext = "Taxis SF"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
PlayerInfo[para1][pExit] = 10;
printf(" %s has invitado a %s han entrado %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Usted ha entrado a la Facciуn: [%s] Invitado por el lider %s", ftext,sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), " Tu has sido Invitado %s a la Facciтn: [%s]", giveplayer,ftext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Error] El Usuario aparece en Otra Facciуn/Organizaciуn.");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Solo los lideres pueden usar este comando!");
}
}
return 1;
}