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.