SA-MP Forums Archive
[Pedido] /motor - 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] /motor (/showthread.php?tid=449227)



/motor - SouUmaJujuba - 07.07.2013

Nгo faзo nem ideia de como comeзar a fazer o comando /motor, Pode me Ajudar Ok, quando o player dentro de um veiculo digitar /motor o veiculo desliga as luzes e nгo anda atй digitarem /motor de novo... Parece Simples, mas nгo sei como criar... Me Ajudem Por Favor!



Re: /motor - Gii - 07.07.2013

https://sampwiki.blast.hk/wiki/SetVehicleParamsEx


Respuesta: /motor - viniciuship - 07.07.2013

Tenta Ai

pawn Код:
// topo
new Motor[MAX_PLAYERS];
new engine,lights,alarm,doors,bonnet,boot,objective;
// OnPlayerConnect(playerid)
Motor[playerid] = 0;
pawn Код:
if(!strcmp(cmd,"/motor",true))
{
if(Motor[playerid] == 0) {

Motor[playerid] = 1;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0x0000FFAA, "[ Veiculo ] {FFFFFF}Veiculo Ligado!");
}
else
{
Motor[playerid] = 0;
new vid = GetPlayerVehicleID(playerid);
if(vid != INVALID_VEHICLE_ID)
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0x0000FFAA, "[ Veiculo ] {FFFFFF}Veiculo Desligado! ");
}
return true;
}



Re: /motor - Coe1 - 07.07.2013

http://forum.sa-mp.com/showthread.ph...Fveiculo+ligar


Re: /motor - SouUmaJujuba - 08.07.2013

Funcionou direitinho Vinicius! Muito obrigado cara!! tava precisando...