28.04.2010, 01:42
Ok, Aqui te coloco el comando ahora mismo, y continua igual si elimino if(IsPlayerConnected(playerid)) el pawno me tira error y no termina de compilar.
Gracias!!!!!
Un saludo
Gracias!!!!!
pawn Код:
if(strcmp(cmd, "/repair", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] != 21 || PlayerInfo[playerid][pLeader] != 21)
{
SendClientMessage(playerid, COLOR_GREY, " You are not a Car Mechanic!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /repair [playerid/PartOfName] [precio]");
return 1;
}
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if(money < 1 || money > 999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 999!"); 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 hacer eso!"); return 1; }
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Le has ofrecido a %s arreglar su auto por $%d .",giveplayer,money);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Mecanico %s ofrece reparacion de su auto por $%d, (escribe /aceptar repair) para aceptar.",sendername,money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
RepairVehicle(GetPlayerVehicleID(playa));
RepairOffer[playa] = playerid;
RepairPrice[playa] = money;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " El jugador no esta cerca de ti / not in a car.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " El jugador no esta en linea.");
}
}
return 1;
}