10.12.2010, 00:24
ola, estou encontrando um problema em meu GM :
SITUAЗГO:
Sou lider de uma organiзгo , ai vou convidar alguem para fazer parte dela = ate OK
quando dou /convidar e o player da o comando /aceitar convite, o servidor dentro de uns 20 segundo cai O.o
todas as coisas do meu GM eu programei menos o registro e o bendito convidar... registro fuincia normalmente atualmente apromorei ele mas quando a pessoa aceita o convite o server vai pro barro e shutdown.
Alguem pode me dar uma luz do q pode esta contecendo ?
o comando segue abaixo
*** onde o player aceita ***
desde ja Obrigado
SITUAЗГO:
Sou lider de uma organiзгo , ai vou convidar alguem para fazer parte dela = ate OK
quando dou /convidar e o player da o comando /aceitar convite, o servidor dentro de uns 20 segundo cai O.o
todas as coisas do meu GM eu programei menos o registro e o bendito convidar... registro fuincia normalmente atualmente apromorei ele mas quando a pessoa aceita o convite o server vai pro barro e shutdown.
Alguem pode me dar uma luz do q pode esta contecendo ?
o comando segue abaixo
Код:
if(strcmp(cmd, "/convidar", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USO: /convidar [playerid/Parte-do-Nick]"); return 1; } new para1; new ftext[20]; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLeader] >= 1 && PlayerInfo[para1][pMember] == 0) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] >= 0) { if(PlayerInfo[playerid][pLeader] == 0) { ftext = "Civil"; } else if(PlayerInfo[playerid][pLeader] == 1) { ftext = "Polнcia Militar"; } else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "Polнcia Federal"; } else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "Forзas Armadas"; } else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "Emergкncias."; } else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "Ballas Gang"; } else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "Grove Street"; } else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "Polнtico"; } else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Assassino"; } else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "Repуrter"; } else if(PlayerInfo[playerid][pLeader] == 11) { ftext = "Instrutor"; } else if(PlayerInfo[playerid][pLeader] == 12) { ftext = "Los Vagos"; } else if(PlayerInfo[playerid][pLeader] == 13) { ftext = "Motoqueiros"; } else if(PlayerInfo[playerid][pLeader] == 14) { ftext = "Policia Rodoviбria"; } else if(PlayerInfo[playerid][pLeader] == 15) { ftext = "Los Aztecas"; } else if(PlayerInfo[playerid][pLeader] == 16) { ftext = "Triads"; } else if(PlayerInfo[playerid][pLeader] == 17) { ftext = "Yakuza"; } else if(PlayerInfo[playerid][pLeader] == 18) { ftext = "Terroristas"; } else { return 1; } GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); printf("Adm: %s convidou %s para entrar no grupo dos: '%s'", sendername, giveplayer, ftext); format(string, sizeof(string), "* Vocк recebeu um convite para entrar na profissгo '%s' (digite /aceitar convite) para aceitar.", ftext, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Vocк convidou %s para sua profissгo '%s'.", giveplayer,ftext); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); Invite[para1] = 1; InviteOffer[para1] = playerid; InviteJob[para1] = PlayerInfo[playerid][pLeader]; } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a ultilizar este comando !"); } } return 1; }
Код:
if(strcmp(x_job,"convite",true) == 0) { if(Invite[playerid] == 1) { if(IsPlayerConnected(InviteOffer[playerid])) { new str[256]; new ftext[20]; GetPlayerName(InviteOffer[playerid], giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[InviteOffer[playerid]][pLeader] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PM"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "PF"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Forзas Armadas"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "Emergкncias."; ChosenSkin[playerid] = 71; SetPlayerSkin(playerid, 71); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 5) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Ballas Gang"; ChosenSkin[playerid] = 102; SetPlayerSkin(playerid, 102); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 6) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Grove Street"; ChosenSkin[playerid] = 105; SetPlayerSkin(playerid, 105); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 7) { PlayerInfo[playerid][pTeam] = 7; gTeam[playerid] = 7; ftext = "Polнtico"; ChosenSkin[playerid] = 295; SetPlayerSkin(playerid, 295); } { format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext); SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str); format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, str); SelectCharID[playerid] = PlayerInfo[playerid][pMember]; SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]); PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader]; PlayerInfo[playerid][pRank] = 1; return 1; } if(PlayerInfo[InviteOffer[playerid]][pLeader] == 8) { PlayerInfo[playerid][pTeam] = 8; gTeam[playerid] = 8; ftext = "Assassino"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 9) { PlayerInfo[playerid][pTeam] = 9; gTeam[playerid] = 9; ftext = "Repуrter"; ChosenSkin[playerid] = 227; SetPlayerSkin(playerid, 227); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 11) { PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; ftext = "Instrutor"; ChosenSkin[playerid] = 59; SetPlayerSkin(playerid, 59); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 12) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Vagos"; ChosenSkin[playerid] = 109; SetPlayerSkin(playerid, 109); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 13) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Motoqueiros"; ChosenSkin[playerid] = 254; SetPlayerSkin(playerid, 254); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 14) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 5; ftext = "Policia Rodoviбria"; ChosenSkin[playerid] = 288; SetPlayerSkin(playerid, 288); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 15) { PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; ftext = "Los Aztecas"; ChosenSkin[playerid] = 116; SetPlayerSkin(playerid, 116); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "Triads"; ChosenSkin[playerid] = 111; SetPlayerSkin(playerid, 111); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 17) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "yakuza"; ChosenSkin[playerid] = 123; SetPlayerSkin(playerid, 123); } else if(PlayerInfo[InviteOffer[playerid]][pLeader] == 18) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "terroristas"; ChosenSkin[playerid] = 291; SetPlayerSkin(playerid, 291); } else { return 1; } PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer[playerid]][pLeader]; PlayerInfo[playerid][pRank] = 1; SelectCharID[playerid] = PlayerInfo[playerid][pMember]; format(str, 256, "* %s aceitou seu convite proposto a organizaзгo '%s'.", sendername, ftext); SendClientMessage(InviteOffer[playerid], COLOR_LIGHTBLUE, str); SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel]); format(str, 256, "* Vocк aceitou o convite de emprego '%s' proposto por %s, parabйns.", ftext, giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, str); } else { SendClientMessage(playerid, COLOR_GREY, " O jogador que lhe convidou nгo estб conectado."); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " Vocк nгo foi convidado de absolutamente nada."); return 1; } }
desde ja Obrigado