Szerző Téma: /E off  (Megtekintve 507 alkalommal)

Nem elérhető killse

  • 161
    • Profil megtekintése
/E off
« Dátum: 2011. október 13. - 17:01:21 »
0 Show voters
Sziasztok!
Egy olyan fst kérné hogy ha valaki beírja azt hogy \"/e off\" akkor Leáll a motor>:D >:D

/E off
« Válasz #1 Dátum: 2011. október 13. - 17:27:49 »
0 Show voters
[pawn]
      new engine, lights, alarm, doors, bonnet, boot, objective;
      GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
      SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective);
[/pawn]

/E off
« Válasz #2 Dátum: 2011. október 13. - 17:39:05 »
0 Show voters
Idézetet írta: kadaradam date=1318519669\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"12475\" data-ipsquote-contentclass=\"forums_Topic
[pawn]
      new engine, lights, alarm, doors, bonnet, boot, objective;
      GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
      SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective);
[/pawn]
 
Kiegészíteném:
[pawn]#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, \"\")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1[/pawn]
[pawn]public OnPlayerCommandText(playerid,cmdtext[])
{
dcmd(e,1,cmdtext);
return 0;
}[/pawn]
[pawn]dcmd_e(playerid,params[])
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
if(!strlen(params)) return SendClientMessage(playerid, 0xF6BB0AA, \"Használat: /E [on/off]\");
if(strcmp(params,\"off\",true) == 0)
{
   GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
   SetVehicleParamsEx(GetPlayerVehicleID(playerid), 0, lights, alarm, doors, bonnet, boot, objective);
   SendClientMessage(playerid,0xFF9900,\"INFO: Motor leállítva!\");
}
else if(strcmp(params,\"on\",true) == 0)
{
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
   SetVehicleParamsEx(GetPlayerVehicleID(playerid), 1, lights, alarm, doors, bonnet, boot, objective);
   SendClientMessage(playerid,0xFF9900,\"INFO: Motor beindítva!\");
}
else SendClientMessage(playerid, 0xF6BB0AA, \"Használat: /E [on/off]\");
return 1;
}[/pawn]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal