• 04 Juin 2026, 09:11:56


Auteur Sujet: commande /herce  (Lu 1923 fois)

0 Membres et 1 Invité sur ce sujet

Hors ligne madinina972

  • *
  • Grand Banditisme
  • Debutant dans le pawn
  • Messages: 517
    • Voir le profil
commande /herce
« le: 10 Juin 2008, 21:45:43 »
bonjour,

j'ai trouvé un scipt qui m'interresse sur le form de sa-mp

mai le pb c'est que je c'est pas ces kel commandes ? regarder



/*
STINGER SCRIPT BY GROVE!

GO TO LINE 40 FOR THE OnPlayerCrossStinger CALLBACK AND HAVE FUN :P

(c)Jay 2008

To add a Stinger, Usage:

CreateStinger(stingerid,Float:x,Float:y,Float:z);

*/
#include <a_samp>
#define MAX_STINGER 2 //just increase it if you add more than 20 stingers.
#define white 0xFFFFFFAA
new MAXPLAYERS;
forward PlayerToPoint(Float:radi,playerid,Float:x,Float:y,Float:z);
forward stinger();
forward StopVehicle(playerid);
new sting[MAX_STINGER], Float:Rot[4][MAX_STINGER];

public OnFilterScriptInit()
{

   //STINGERS:

   CreateStinger(0,332.2, 2503.8, 15.8);
    CreateStinger(1,332.2+15, 2503.8+15, 15.8);








//--
   print("Stinger script 0.1 by Grove Loaded");
   SetTimer("stinger",40,1); //checks if the player is near a stinger
   MAXPLAYERS = GetMaxPlayers();
}
public OnFilterScriptExit()
{
   for(new i = 0; i < MAX_STINGER; i++)
   {
      DestroyObject(sting);
   }
   print("Stinger script 0.1 by Grove unloaded!");
}

stock CreateStinger(id,Float:X,Float:Y,Float:Z)
{
   sting[id] = CreateObject(1593,X,Y,Z,0,0,0);
   GetObjectPos(sting[id],Rot[1][id],Rot[2][id],Rot[3][id]);
   return id;
}

OnPlayerCrossStinger(playerid,stingerid) //do what you like here :)
{
   if(!IsPlayerInAnyVehicle(playerid)) return false;
   PlayerPlaySound(playerid,32000,0,0,0); //sound for popping tyres NOT SUPPORTED IN SA:MP
   SetVehicleToRespawn((GetPlayerVehicleID(playerid)));
   GameTextForPlayer(playerid,"~r~Pop goes the weasel!",5000,5);
   //Perhaps here, you could freeze the vehicle, and remove the player from it!
   #pragma unused stingerid


/*   new string[256];
   format(string,256,"DEBUG: stinger id: %d.",stingerid);
   SendClientMessage(playerid,white,string);
*/
   return true;
}


public stinger()
{
   for(new i = 0; i < MAX_STINGER; i++)
   {
       for(new pi = 0; pi <MAXPLAYERS; pi++)
       {
         if(PlayerToPoint(1.2,pi,Rot[1],Rot[2],Rot[3]))
         {
              OnPlayerCrossStinger(pi,i);
         }
      }
   }
}

public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
   {
   new Float:oldposx, Float:oldposy, Float:oldposz;
   new Float:tempposx, Float:tempposy, Float:tempposz;
   GetPlayerPos(playerid, oldposx, oldposy, oldposz);
   tempposx = (oldposx -x);
   tempposy = (oldposy -y);
   tempposz = (oldposz -z);
   if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
   {
      return 1;
   }
   return 0;
}
Madinina972



Hors ligne Nikko™

  • *
  • Mafioso
  • Messages: 2393
    • Voir le profil
Re : commande /herce
« Réponse #1 le: 10 Juin 2008, 21:51:56 »
Et tu veu quoi en fait ??

++
nikko

Hors ligne madinina972

  • *
  • Grand Banditisme
  • Debutant dans le pawn
  • Messages: 517
    • Voir le profil
Re : commande /herce
« Réponse #2 le: 10 Juin 2008, 21:53:47 »
ba  le pb c'est qu'il y a pa de comande donc on peut pa utilisé le script
Madinina972



Hors ligne Bayshore

  • *
  • Grand Banditisme
  • Messages: 923
    • Voir le profil
Re : commande /herce
« Réponse #3 le: 11 Juin 2008, 15:31:26 »
Dans OnFilterScriptInit, règle la position des stingers. :)
Sinon pour définir ce que ça fait quand tu roule sur une stinger, règle dans OnPlayerCrossStinger(playerid,stingerid) :)

++
Alexandre

Hors ligne madinina972

  • *
  • Grand Banditisme
  • Debutant dans le pawn
  • Messages: 517
    • Voir le profil
Re : commande /herce
« Réponse #4 le: 13 Juin 2008, 15:14:59 »
je met koi dedans je comprend pa tres bien :s
Madinina972



Hors ligne [StAfF]MaN

  • [StAfF] forever ^^
  • *
  • Gangster
  • [StAfF] un jour, [StAfF] toujours ^^ !!!
  • Messages: 1040
    • Voir le profil
    • SITE [StAfF]
Re : commande /herce
« Réponse #5 le: 13 Juin 2008, 17:14:47 »
T'as pas besoin de commande, tu met le code dans ton GM en faisant attention avec les publics qui sont déjà dans ton GM (pour pas qu'ils y soient deux fois quoi :p )

Et en faite, quand tu ira sur ton serv, les stingers seront mis / missent (je ne sais pas trop ce que c'est ;))  aux positions ou tu les aura mis / missent. Mais tu n'as pas besoin de commande ^^
^v^v^v^v|
   StAfF  |                              IP: gtaunderground.No-Ip.org

^v^v^v^v|

Hors ligne madinina972

  • *
  • Grand Banditisme
  • Debutant dans le pawn
  • Messages: 517
    • Voir le profil
Re : commande /herce
« Réponse #6 le: 14 Juin 2008, 16:44:40 »
les stinger c'est des herce

bref

mai moi enfaite je voulais fire un truk ke kand je fi la cmd a un endroit les herce se mette a l'endroit ou je sui ;)

++
madinina_972
Madinina972