Randome Fire System help.
#1

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
Reply
#2

Use [pawn] tags please first
Reply
#3

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 ?
Reply
#4

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

Try looking at this:

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


Forum Jump:


Users browsing this thread: 1 Guest(s)