|
|
|
|
#1 |
|
Little Clucker
![]() Join Date: Oct 2011
Posts: 33
Reputation: 0
|
Hola lo que quiero hacer es modificar este comando para que se pueda usar en cualquier parte pero dice que solo se puede en el taller, la cosa es que no se como hacer esto.
ES UN COMANDO DE REPARAR PARA LA FACCIÓN DE MECANICOS if(strcmp(cmd, "/reparara", true) == 0) { if(IsAtMecanicosx(playerid)) { if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 26 || PlayerInfo[playerid][pMember] == 26) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /Reparara [ID o Nombre] [Precio]"); return 1; } new playa; new money; playa = ReturnUser(tmp); tmp = strtok(cmdtext, idx); money = strval(tmp); if(money < 50 || money > 30000) { SendClientMessage(playerid, COLOR_GREY, " Precio: 50 Dolar ~ 30000 Dolares"); return 1; } if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa)) { if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "No Puedes Realizar Esta Acción!"); return 1; } GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* Ofreciste a: %s para Arreglar el Coche, Por: $%d .",giveplayer,money); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Mecanico: %s Te Ofrece Reparacion Por: $%d, (Escribe /Aceptar Reparacion)",sendername,money); SendClientMessage(playa, COLOR_LIGHTBLUE, string); RepairOffer[playa] = playerid; RepairPrice[playa] = money; } else { SendClientMessage(playerid, COLOR_GREY, " Jugador No Está Cerca o No Está en un Coche"); } } } else { SendClientMessage(playerid, COLOR_GREY, "Jugador Desconectado"); } } else { SendClientMessage(playerid, COLOR_GREY, "No eres mecácnico!"); } } else { SendClientMessage(playerid, COLOR_GREY, "No estás en el taller!"); } return 1; } |
|
|
|
|
|
#2 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Colombia
Posts: 639
Reputation: 35
|
Que tal asi? Pruebalo y me dices...
pawn Code:
|
|
|
|
|
|
#3 |
|
Little Clucker
![]() Join Date: Oct 2011
Posts: 33
Reputation: 0
|
No me funciono, dice que no soy mecanico, ese if(IsAtMecanicosx es donde describe las coordenadas del comando.
public IsAtMecanicosx(playerid) { if(IsPlayerConnected(playerid))//puse artos 999999 para agrandar el rango para todo el mapa pero no alcanzo. { if(PlayerToPoint(9999999999999999999,playerid,1641 .2056,-2139.6641,13.4100)) { return 1; } else if(PlayerToPoint(99999999999999999999999,playerid,-1528.1193,301.4527,53.1754)) { return 1; } else if(PlayerToPoint(99999999999999999999999999999,pla yerid,613.0524,-124.2267,997.9922)) { return 1; } else if(PlayerToPoint(99999999999999999999999,playerid,-1498.4117,728.2124,7.3706)) { return 1; } else if(PlayerToPoint(99999999999999999999,playerid,-1502.0536,737.0365,7.3706)) { return 1; } } return 0; } |
|
|
|
|
|
#4 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Colombia
Posts: 639
Reputation: 35
|
Ok, intenta de nuevo.
pawn Code:
|
|
|
|
|
|
#5 |
|
Little Clucker
![]() Join Date: Oct 2011
Posts: 33
Reputation: 0
|
Me sirvio!! gracias pero el problema esque me dice que el comando /aceptarreparacion no existe
|
|
|
|
|
|
#6 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: May 2011
Location: Colombia
Posts: 639
Reputation: 35
|
Dejamelo ver, quiza tambien tenga algo que ver...
|
|
|
|
|
|
#7 |
|
Little Clucker
![]() Join Date: Oct 2011
Posts: 33
Reputation: 0
|
HTML Code:
if(strcmp(cmd, "/reparara", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 26 || PlayerInfo[playerid][pMember] == 26)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Utiliza: /Reparara [ID o Nombre] [Precio]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(money < 50 || money > 30000) { SendClientMessage(playerid, COLOR_GREY, " Precio: 50 Dolar ~ 30000 Dolares"); return 1; }
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, playa)&& IsPlayerInAnyVehicle(playa))
{
if(playa == playerid) { SendClientMessage(playerid, COLOR_GREY, "No Puedes Realizar Esta Acción!"); return 1; }
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Ofreciste a: %s para Arreglar el Coche, Por: $%d .",giveplayer,money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Mecanico: %s Te Ofrece Reparacion Por: $%d, (Escribe /Aceptar Reparacion)",sendername,money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
RepairOffer[playa] = playerid;
RepairPrice[playa] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Jugador No Está Cerca o No Está en un Coche");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Jugador Desconectado");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "No eres mecácnico!");
}
return 1;
}
|
|
|
|
|
|
#8 |
|
Little Clucker
![]() Join Date: Jan 2011
Posts: 35
Reputation: 10
|
Deja el /aceptarreparacion , para ver cual es el problema entre ambos.
|
|
|
|
|
|
#9 |
|
Little Clucker
![]() Join Date: Oct 2011
Posts: 33
Reputation: 0
|
Mire el GM y el problema es que no esta el comando de /aceptar reparacion
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [AYUDA] Como Hago Para Que un Comando Este En Dialog | Pandax | Español/Spanish | 13 | 16/05/2011 11:07 PM |
| [AYUDA] Como hacer este tipo de comando | nero97 | Español/Spanish | 23 | 13/08/2010 03:23 AM |
| como es este comando? | leociclon | Español/Spanish | 13 | 17/06/2010 01:52 PM |
| [AYUDA]Como instalo y como veo si funciona este Fs? | Karkanos | Español/Spanish | 1 | 15/01/2010 08:32 PM |
| [Duv] Como completar este comando? | xolp25 | Português/Portuguese | 13 | 30/12/2009 03:35 PM |