if (IsPlayerInAnyVehicle(playerid)) { RepairVehicle(GetPlayerVehicleID(playerid)); } else return SendClientMessage(playerid, 0xFF0000FF, "No te encuentras en un vehiculo.");
Originally Posted by WHEELMANDTS
bueno lo unico que les pido es que me deen un comando de /reparar solo eso, me hace mucha falta
eso seria, gracias |
if(strcmp(cmd, "/reparar", true) == 0) {
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid,0xFF0000FF, "ERROR: Debes estar en un vehiculo para usar este comando");
SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
SendClientMessage(playerid,0xF3FD7BFF,"Server: Has reparado tu coche exitosamente");
return 1;
}
if (!strcmp(cmdtext, "/fix", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x61D911FF, "Vehнculo reparado.");
}
else SendClientMessage(playerid, 0xFF0000FF, "Debes estar en un vehнculo.");
return 1;
}
if(strcmp(cmd,"/reparar",true)==0 || strcmp(cmd,"/r",true)==0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_WHITE,"Usted no esta en un vehiculo!.");
return 1;
}
new mensaje=random(19);
PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0);
new Float:angle;
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
SetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
if(mensaje == 0)
{
new color1=random(126);
new color2=random(126);
RepairVehicle(GetPlayerVehicleID(playerid));
ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
GameTextForPlayer(playerid,"~h~Nuevo motor y capa de pintura:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 1)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Nuevo motor:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 2)
{
new color1=random(126);
new color2=random(126);
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
GameTextForPlayer(playerid,"~h~La mano de pintura va incluida:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 3)
{
new color1=random(126);
new color2=random(126);
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
GameTextForPlayer(playerid,"~h~Espero que te guste el nuevo color:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 4)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Escucha el rugido del nuevo motor:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 5)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~No fue dificil:~n~$100~n~~b~Arreglado",2000,5);
}if(mensaje == 6)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Casi que no termino:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 7)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Esta como nuevo:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 8)
{
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Esta realmente mal no pude:~n~$100~n~~r~Estrellado",2000,5);
}
if(mensaje == 9)
{
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~El motor no enciende:~n~$100~n~~r~Estrellado",2000,5);
}
if(mensaje == 10)
{
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Intenta iniciar el motor:~n~$100~n~~r~Estrellado",2000,5);
}
if(mensaje == 11)
{
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Como fue rompiste esto:~n~$100~n~~r~Estrellado",2000,5);
}
if(mensaje == 12)
{
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~No consegui el repuesto:~n~$100~n~~r~Estrellado",2000,5);
}
if(mensaje == 13)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-100);
GameTextForPlayer(playerid,"~h~Fue dificil pero pude:~n~$100~n~~b~Arreglado",2000,5);
}
if(mensaje == 14)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-500);
GameTextForPlayer(playerid,"~h~Fue demorado:~n~Pagame la horas extra~n~$500~n~~b~Arreglado",2000,5);
}
if(mensaje == 15)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-50);
GameTextForPlayer(playerid,"~h~Solo era un mugre~n~$50~n~~b~Arreglado",2000,5);
}
if(mensaje == 16)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~h~Esta vez va gratis~n~$0~n~~b~Arreglado",2000,5);
}
if(mensaje == 17)
{
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~h~Tu mismo lo pudiste arreglar~n~$0~n~~b~Arreglado",2000,5);
}
if(mensaje == 18)
{
new color1=random(126);
new color2=random(126);
RepairVehicle(GetPlayerVehicleID(playerid));
ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
GameTextForPlayer(playerid,"~h~La pintura va gratis~n~$0~n~~b~Arreglado",2000,5);
}
return 1;
}