What's the problem? else
#9

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
As far as i see the script has many bugs..
It would be like this -
pawn Код:
new earth[MAX_PLAYERS];//on top

earth[playerid] = 1;//put this where u begin the earthquick

CMD:stearth(playerid, params[])
{
 if(!IsPlayerAdmin(playerid))retrun SendClientMessage(playerid, -1, "{FF0000}Only rcon admins can use this command!");
 if(earth[player] == 0)retrun SendClientMessage(playerid, -1, "{FF0000}ERROR: No earthquake going on now.");
 
   SendClientMessage(playerid, -1, "{00CC00}[SUCCESS]: You have stopped the earthquake.");
   // DestroyObject(playerid); You need to put object id returned by createobject() here
   SetPlayerDrunkLevel(playerid, 0);
   StopAudioStreamForPlayer(playerid);
   earth[playerid] = 0;
   return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    earth[playerid] = 0;
    return 1;
}
[MAX_PLAYERS] isn't needed d:

OT:
You can create the earthquake objects by using;
pawn Код:
new EarthquakeObject[10]; //0, 1, 2, 3, 4, 5, 6, 7, 8, 9    INCREASE IF NEEDED
To create the objects, example.

pawn Код:
//Under the start-earthquake callback or w.e
EarthquakeObject[0] = CreateObject(...);
EarthquakeObject[1] = CreateObject(...);
....
EarthquakeObject[9] = CreateObject(...);

//I guess you'd have to destroy the original objects though.
Reply


Messages In This Thread
What's the problem? else - by Glossy42O - 18.12.2014, 06:04
AW: What's the problem? else - by Flori - 18.12.2014, 06:07
Re: What's the problem? else - by JeaSon - 18.12.2014, 06:17
Re: What's the problem? else - by Glossy42O - 18.12.2014, 06:30
Re: What's the problem? else - by Ada32 - 18.12.2014, 11:56
Re: What's the problem? else - by Glossy42O - 18.12.2014, 12:19
Re: What's the problem? else - by Ada32 - 18.12.2014, 12:28
Re: What's the problem? else - by BroZeus - 18.12.2014, 12:56
Re: What's the problem? else - by Kyance - 18.12.2014, 13:18
Re: What's the problem? else - by BroZeus - 18.12.2014, 14:14

Forum Jump:


Users browsing this thread: 2 Guest(s)