[HELP] Command to insert and remove player of police does not work
#8

Apologies, following correct code:
/cnp
PHP код:
if(strcmp(cmd"/cnp"true) == 0) {
new 
id;
//new tmp[256];
tmp strtok(cmdtextidx);
if(!
strlen(tmp)){
SendClientMessage(playeridVermelho"/cnp [id]");
return 
1;
}
id strval(tmp);
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), P_CONTASaname);
if(
dini_Int(file,"Tenente") == 1)
{
new 
pname[MAX_PLAYER_NAME];
GetPlayerName(idpnameMAX_PLAYER_NAME);
format(file2sizeof(file2), P_CONTASpname);
dini_IntSet(file2"Punidoo"0);
format(stringsizeof(string),"O Tenente %s(ID: %d) colocou %s(ID:%d) na policia novamente"anameplayerid,pname,id);
SendClientMessageToAll(0xFF66FFAAstring);
} else {
SendClientMessage(playeridVermelho"** {6DB3FE}Vocк nгo tem permissгo.");
}
return 
1;

/tdp:
PHP код:
if(strcmp(cmd"/tdp"true) == 0) {
new 
aname[MAX_PLAYER_NAME];
GetPlayerName(playeridanameMAX_PLAYER_NAME);
format(filesizeof(file), P_CONTASaname);
if(
dini_Int(file,"Tenente") >= 0){
new 
plid;
tmp strtok(cmdtextidx);
if(!
strlen(tmp)) {
SendClientMessage(playeridVermelho"* Digite: /tdp [id].");
return 
1;
}
plid strval(tmp);
new 
pname[MAX_PLAYER_NAME];
GetPlayerName(plidpnameMAX_PLAYER_NAME);
format(file2sizeof(file2), P_CONTASpname);
if(
IsPlayerConnected(plid)){
if(
dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == 8
|| dini_Int(file2,"Profissao") == || dini_Int(file2,"Profissao") == 10 || dini_Int(file2,"Profissao") == 28 || dini_Int(file2,"Profissao") == 31 || dini_Int(file2,"Profissao") == 32){
dini_IntSet(file2,"Profissao",0);
dini_IntSet(file2,"Punidoo"1);
format(stringsizeof(string),"O Tenente %s(ID: %d) retirou %s(ID:%d) da policia"anameplayerid,pname,plid);
SendClientMessageToAll(0xFF66FFAAstring);
Logarprof(plid);
}
}
}else{
format(stringsizeof(string), "(ERRO) Jogador nгo conectado!");
SendClientMessage(playeridVermelhostring);
}
return 
1;

They are aligned left even ..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)