[Ajuda] desalgemar bugado
#1

Bem Pessoal Venho Aki Pedir Mais Uma Ajudinha Para vcs !

Tipo pessoal quando do /desalgemar o cara continuar parado e nгo se meche fica paradгo

ai meus codico

PHP код:
if(strcmp(cmd, "/desalgemar", true) == 0) {
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(
dini_Int(file, "Profissao") == Policia_Militar || dini_Int(file, "Profissao") == Policia_Civil || dini_Int(file, "Profissao") == Policia_Federal || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "aAdmin") == 1){
new 
tmp[256];
new 
plid;
tmp = strtok(cmdtext, idx);
if(!
strlen(tmp)){
SendClientMessage(playerid, Vermelho, "/desalgemar [id]");
return 
1;
}
plid = strval(tmp);
if(
plid == playerid){
SendClientMessage(playerid, Vermelho, "Vocк nгo pode fazer isto com si mesmo.");
return 
1 ;
}
if(!
IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "O jogador nгo estб conectado");
return 
1;
} else {
if(
GetDistanceBetweenPlayers(plid,playerid) < 10){
format(string, sizeof(string), "(INFO) O jogador %s te desalgemou.", aname);
GameTextForPlayer(plid,"~w~Desalgemado", 25000, 3);
SendClientMessage(plid, 0x8C8CFFAA, string);
SendClientMessage(playerid, 0x8C8CFFAA, "(INFO) Desalgemado com sucesso.");
algemado[plid] = 0;
return 
1;
} else {
SendClientMessage(playerid,Vermelho," Chegue mais perto para desalgemar.");
return 
1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um policial!");
return 
1;
}
} 
Reply
#2

TogglePlayerControllable

PHP код:
TogglePlayerControllable(plid, 1); 
Reply
#3

deu esses erro
Quote:

C:\Users\alexandre\Desktop\gm\Brasil Vida Real\gm be\gm\gamemodes\EXPRPG.pwn(4944) : error 017: undefined symbol "plid"

Reply
#4

PHP код:
if(strcmp(cmd, "/desalgemar", true) == 0) { 
new 
aname[MAX_PLAYER_NAME]; 
GetPlayerName(playerid, aname, MAX_PLAYER_NAME); 
format(file, sizeof(file), PASTA_CONTAS, aname); 
if(
dini_Int(file, "Profissao") == Policia_Militar || dini_Int(file, "Profissao") == Policia_Civil || dini_Int(file, "Profissao") == Policia_Federal || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "aAdmin") == 1){ 
new 
tmp[256]; 
new 
plid; 
tmp = strtok(cmdtext, idx); 
if(!
strlen(tmp)){ 
SendClientMessage(playerid, Vermelho, "/desalgemar [id]"); 
return 
1; 
} 
plid = strval(tmp); 
if(
plid == playerid){ 
SendClientMessage(playerid, Vermelho, "Vocк nгo pode fazer isto com si mesmo."); 
return 
1 ; 
} 
if(!
IsPlayerConnected(plid)){ 
SendClientMessage(playerid, Vermelho, "O jogador nгo estб conectado"); 
return 
1; 
} else { 
if(
GetDistanceBetweenPlayers(plid,playerid) < 10){ 
format(string, sizeof(string), "(INFO) O jogador %s te desalgemou.", aname); 
GameTextForPlayer(plid,"~w~Desalgemado", 25000, 3); 
SendClientMessage(plid, 0x8C8CFFAA, string); 
SendClientMessage(playerid, 0x8C8CFFAA, "(INFO) Desalgemado com sucesso."); 
TogglePlayerControllable(plid, 1);
algemado[plid] = 0; 
return 
1; 
} else { 
SendClientMessage(playerid,Vermelho," Chegue mais perto para desalgemar."); 
return 
1; 
} 
} 
} else { 
SendClientMessage(playerid,Vermelho,"(ERRO) Vocк nгo й um policial!"); 
return 
1; 
} 
} 
O posicionamento da funзгo deve estar em lуgica.

Usa a cabeзa, pense um pouco !
Reply
#5

Problema Resolvido Brigadгo ai
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)