GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: BoSS - 2012. szeptember 23. - 14:29:22

Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 14:29:22
Sziasztok.
Hogy lehet meg oldani hogy a nagyobb fegyvereken pl AK-47,M4 meg ilyesmi fegyokon legyen lézer automatikusan,tehát ne parancsal legyen,csak amikor arra váltunk egybõl rajta legyen.
Elõre is köszi a helpet.
Cím: Automatikus lézer
Írta: Extasy449 - 2012. szeptember 23. - 15:56:41
Milyen \"lézerre\" gondolsz te?
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 16:00:39
Idézetet írta: Extasy449 date=1348408601\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27865\" data-ipsquote-contentclass=\"forums_Topic
Milyen \"lézerre\" gondolsz te?
 
Fegyverre való lézerre...tudod ilyen piros csík :D olyan van ami parancsra rakja rá ,de nekem úgy kéne ha azt a fegyot választom akkor azon automatikusan rajta van.
Cím: Automatikus lézer
Írta: Extasy449 - 2012. szeptember 23. - 16:09:47
Ezt egy módba láttad? Mert nem hiszem hogy az alap SA-ban benne van  ;D
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 16:18:28
Idézetet írta: Extasy449 date=1348409387\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27865\" data-ipsquote-contentclass=\"forums_Topic
Ezt egy módba láttad? Mert nem hiszem hogy az alap SA-ban benne van  ;D
 
Igen láttam már...egy DM szeron,ahol nem kellett semmilyen parancsot használ,hanem rajta volt már a lézer.
Cím: Automatikus lézer
Írta: Delta - 2012. szeptember 23. - 16:25:47
Laser Pointer 3.0 [uPDATED]
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 18:35:21
Idézetet írta: Delta date=1348410347\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27865\" data-ipsquote-contentclass=\"forums_Topic
Laser Pointer 3.0 [uPDATED]



És ez automatikus? xDD
Cím: Automatikus lézer
Írta: lusta19 - 2012. szeptember 23. - 18:41:41
Látod hogy nem
/laseron - activate the laser pointer
/laseroff - deactivate the laser pointer
/lasercol  - change the color of the laser, colors: red (default), green, yellow, blue, pink, orange.
SetPlayerAttachedObject el .
Ha belenézel a forrásba nem nehéz megcsinálni , csak hozzátársítod a megadott fegyverhez .
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 18:49:29
>\" post=\"344535\" timestamp=\"1348418501\"]
Látod hogy nem
/laseron - activate the laser pointer
/laseroff - deactivate the laser pointer
/lasercol  - change the color of the laser, colors: red (default), green, yellow, blue, pink, orange.
SetPlayerAttachedObject el .
Ha belenézel a forrásba nem nehéz megcsinálni , csak hozzátársítod a megadott fegyverhez .
 
[/quote]
Igen,Én látom,hogy nem az xD DE õ szerintem nem olvasta el,hogy Én automatikust szeretnék...azért írtam,hogy
\"És ez automatikus?\"
Cím: Automatikus lézer
Írta: Pedró - 2012. szeptember 23. - 18:51:39
módosítod egy kicsit, és automatikus lesz.
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 23. - 20:29:55
Idézetet írta: Pedro date=1348419099\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"27865\" data-ipsquote-contentclass=\"forums_Topic
módosítod egy kicsit, és automatikus lesz.
 
Ha meg bírnám csinálni,akkor meg csináltam volna már rég :/
Cím: Automatikus lézer
Írta: TengeriMalac - 2012. szeptember 30. - 11:22:50
Nem tudom, megkaptad-e már, ezért módosítottam azt, amit valaki idelinkelt neked.
 
#include <a_samp>
public OnFilterScriptExit() for(new i = 0; i < MAX_PLAYERS; i++) RemovePlayerAttachedObject(i, 0);
public OnPlayerDisconnect(playerid) return RemovePlayerAttachedObject(playerid, 0);
public OnPlayerUpdate(playerid) {
RemovePlayerAttachedObject(playerid, 0);
if((IsPlayerInAnyVehicle(playerid)) || (IsPlayerInWater(playerid))) return 1;
switch (GetPlayerWeapon(playerid)) {
case 23: {
   if(IsPlayerAiming(playerid)) {
      if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.108249, 0.030232, 0.118051, 1.468254, 350.512573, 364.284240);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.108249, 0.030232, 0.118051, 1.468254, 349.862579, 364.784240);
   } else {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
   }
}
case 27: {
   if(IsPlayerAiming(playerid))
   {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.588246, -0.022766, 0.138052, -11.531745, 347.712585, 352.784271);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.588246, -0.022766, 0.138052, 1.468254, 350.712585, 352.784271);
   } else {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
   }
}
case 30: {
   if(IsPlayerAiming(playerid))
   {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.628249, -0.027766, 0.078052, -6.621746, 352.552642, 355.084289);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.628249, -0.027766, 0.078052, -1.621746, 356.202667, 355.084289);
   } else {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
   }
}
case 31: {
   if(IsPlayerAiming(playerid)) {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
   } else {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
   }
}
case 29: {
   if(IsPlayerAiming(playerid)) {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.298249, -0.02776, 0.158052, -11.631746, 359.302673, 357.584259);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.298249, -0.02776, 0.158052, 8.368253, 358.302673, 352.584259);
   } else {
      if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK) SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
      else SetPlayerAttachedObject(playerid, 0, 18643, 6, 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
   }
}
}
return 0;
}
stock IsPlayerInWater(playerid) {
new anim = GetPlayerAnimationIndex(playerid);
if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
     return 0;
}
stock IsPlayerAiming(playerid) {
new anim = GetPlayerAnimationIndex(playerid);
if (((anim >= 1160) && (anim <= 1163)) || (anim == 1167) || (anim == 1365) || (anim == 1643) || (anim == 1453) || (anim == 220)) return 1;
return 0;
}
Cím: Automatikus lézer
Írta: BoSS - 2012. szeptember 30. - 11:52:22
Mükszik,ment a plusz köszönöm szépen :)