SA-MP Forums Archive
Randome Fire System help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Randome Fire System help. (/showthread.php?tid=244475)



Randome Fire System help. - mixboy156 - 27.03.2011

Okay, this is my first script I tried on my own, the only probably is it doesn't seem to work, Reason unknow. I guess because a object can't spawn randomly around, I guess because it might need a command, Buy I don't know can someone help me please?
pawn Код:
//Scripted by Lyle Gibbs AKA Mixboy156
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Random FireSystem");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public Starting(playerid);
{

if(IsPlayerConnected(playerid)
   {
      if (IsPlayerInRangeOfPoint()
      {

            RandomStart = random(10);
            switch(RandomStart)
            {GetPlayerPos()
               case 0,1:
               {
               CreateObject(18688) = 1;
               SendClientMessage(playerid,0xFFFF00AA,"* A fire has started around you");
               }
               case 2,3:
               {
               SendClientMessage(playerid,0xFFFF00AA,"*Call The Fire Deparment");
               }
  {
    return 1;
}

public Starting(playerid)
{

if(IsPlayerConnected(playerid)
   {
      if(IsPlayerInRangeOfPoint()
      {
            RandomStart = random(1);
            switch(Randomstop)
            {GetPlayerPos()
               case 0,1:
               {
               FireEndDestroy[Object](18688) = 1;
               SendClientMessage(playerid,0xFFFF00AA,"* The fire is over");
               }
               case 2,3:
               {
               SendClientMessage(playerid,0xFFFF00AA,"*The is over");

                return 1;
      }


}
#endif



Re: Randome Fire System help. - Jochemd - 27.03.2011

Use [pawn] tags please first


Re: Randome Fire System help. - Stigg - 27.03.2011

Quote:
Originally Posted by mixboy156
Посмотреть сообщение
Okay, this is my first script I tried on my own, the only probably is it doesn't seem to work, Reason unknow. I guess because a object can't spawn randomly around, I guess because it might need a command, Buy I don't know can someone help me please?
pawn Код:
//Scripted by Lyle Gibbs AKA Mixboy156
#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Random FireSystem");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public Starting(playerid);
{

if(IsPlayerConnected(playerid)
   {
      if (IsPlayerInRangeOfPoint()
      {

            RandomStart = random(10);
            switch(RandomStart)
            {GetPlayerPos()
               case 0,1:
               {
               CreateObject(18688) = 1;
               SendClientMessage(playerid,0xFFFF00AA,"* A fire has started around you");
               }
               case 2,3:
               {
               SendClientMessage(playerid,0xFFFF00AA,"*Call The Fire Deparment");
               }
  {
    return 1;
}

public Starting(playerid)
{

if(IsPlayerConnected(playerid)
   {
      if(IsPlayerInRangeOfPoint()
      {
            RandomStart = random(1);
            switch(Randomstop)
            {GetPlayerPos()
               case 0,1:
               {
               FireEndDestroy[Object](18688) = 1;
               SendClientMessage(playerid,0xFFFF00AA,"* The fire is over");
               }
               case 2,3:
               {
               SendClientMessage(playerid,0xFFFF00AA,"*The is over");

                return 1;
      }


}
#endif
What is it your trying to do friend ?


Re: Randome Fire System help. - mixboy156 - 27.03.2011

I am trying to make a fire start randomly, but only if a person is around.


Re: Randome Fire System help. - Stigg - 27.03.2011

Try looking at this:

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