SA-MP Forums Archive
[Pedido] Alguem pode por uma menssagem de erro pra mim? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Alguem pode por uma menssagem de erro pra mim? (/showthread.php?tid=606783)



Alguem pode por uma menssagem de erro pra mim? - RianRBS - 08.05.2016

Olб Pessoal sуu novato em Pawno...
Entгo galera eu estуu criando uma profissгo...
Й o seguinte eu queria que vocкs coloca-sem uma menssagem de erro quando o player nгo tive-se perto das cordenadas do IsPlayerRangeOfPoint, й porque eu nгo estуu conseguindo sй vocкs poderem eu agradeзo!!

Cуdigo abaixo :

Код HTML:
if(strcmp("/rota", cmd, 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") == Taxista || dini_Int(file, "aAdmin") == 1 || Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
}
if(IsPlayerInRangeOfPoint(playerid, 30, 2180.0142,-2288.7466,13.5469)) // playerid = usou o cmd | 7,0 = Distancia | Coordenadas X,Y,Z
vehicle = GetPlayerVehicleID(playerid);
vehicle = GetVehicleModel(vehicle);
new strcmd[1000], strurl[128];
if(vehicle != 455) return SendClientMessage(playerid, Vermelho, "{FF0000}(INFO) {FFD700}Vocк nгo estб em um Caminhгo!");
strcat(strcmd, "{FF0000}Para onde vocк deseja Transportar a Carga?\n", sizeof(strcmd));
strcat(strcmd, "{FFFF00}San Fierro {00FF00}R$950\n", sizeof(strcmd));
strcat(strcmd, "{FF0000}Las Ventura {00FF00}R$850\n", sizeof(strcmd));
ShowPlayerDialog(playerid, rota, DIALOG_STYLE_MSGBOX, "                        ROTA", strcmd, "SF", "LV");
return 1;
}



Re: Alguem pode por uma menssagem de erro pra mim? - PainNagato - 08.05.2016

pawn Код:
if(strcmp("/rota", cmd, 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") == Taxista || dini_Int(file, "aAdmin") == 1 || Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
}
if(!IsPlayerInRangeOfPoint(playerid, 30, 2180.0142,-2288.7466,13.5469))  return SendClientMessage(playerid, -1, "ERRO ");
vehicle = GetPlayerVehicleID(playerid);
vehicle = GetVehicleModel(vehicle);
new strcmd[1000], strurl[128];
if(vehicle != 455) return SendClientMessage(playerid, Vermelho, "{FF0000}(INFO) {FFD700}Vocк nгo estб em um Caminhгo!");
strcat(strcmd, "{FF0000}Para onde vocк deseja Transportar a Carga?\n", sizeof(strcmd));
strcat(strcmd, "{FFFF00}San Fierro {00FF00}R$950\n", sizeof(strcmd));
strcat(strcmd, "{FF0000}Las Ventura {00FF00}R$850\n", sizeof(strcmd));
ShowPlayerDialog(playerid, rota, DIALOG_STYLE_MSGBOX, "                        ROTA", strcmd, "SF", "LV");
return 1;
}



Re: Alguem pode por uma menssagem de erro pra mim? - RianRBS - 08.05.2016

Quote:
Originally Posted by PainNagato
Посмотреть сообщение
pawn Код:
if(strcmp("/rota", cmd, 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") == Taxista || dini_Int(file, "aAdmin") == 1 || Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Delegado || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Narcoticos || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == LSPD || dini_Int(file, "aAdmin") == 1){
}
if(!IsPlayerInRangeOfPoint(playerid, 30, 2180.0142,-2288.7466,13.5469))  return SendClientMessage(playerid, -1, "ERRO ");
vehicle = GetPlayerVehicleID(playerid);
vehicle = GetVehicleModel(vehicle);
new strcmd[1000], strurl[128];
if(vehicle != 455) return SendClientMessage(playerid, Vermelho, "{FF0000}(INFO) {FFD700}Vocк nгo estб em um Caminhгo!");
strcat(strcmd, "{FF0000}Para onde vocк deseja Transportar a Carga?\n", sizeof(strcmd));
strcat(strcmd, "{FFFF00}San Fierro {00FF00}R$950\n", sizeof(strcmd));
strcat(strcmd, "{FF0000}Las Ventura {00FF00}R$850\n", sizeof(strcmd));
ShowPlayerDialog(playerid, rota, DIALOG_STYLE_MSGBOX, "                        ROTA", strcmd, "SF", "LV");
return 1;
}
Valeu deu certo!!!