Help {Script problem}
#1

Help, i compiled the script and theres no any errors, but when i get ingame it says that the commands aren't exist so whats the probelm!!

here's the script:

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <a_samp>
#include <dini>
#include <utils>
#include <zones>
#include <yom_buttons>
#include <streamer>
#include <vstream>
#include <CPLoader>
#include <zcmd>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("DJ by Edwin Atherton");
	print("--------------------------------------\n");
	return 1;
}

enum DJ
{
	pMember,
	pCD
}

new PlayerDJ[playerid][DJ];
new PartyPrepared;
new Float:partyX, Float:partyY, Float:partyZ;
new PplJoinParty;
new PartyOn;
COMMAND:prepare(playerid, params[])
{
	if(PlayerDJ[playerid][pMember] == 1)
	{
	    new vehID;
	    vehID = GetPlayerVehicleID(playerid);
	    if(GetVehicleModel(vehID) == 459)
	    {
	        if(PlayerDJ[playerid][pCD] >= 1)
	        {
	            new str[128], pName[MAX_PLAYER_NAME];
	            GetPlayerName(playerid, pName, sizeof(pName));
	            PlayerDJ[playerid][pCD]--;
	            format(str, sizeof(str), "DJ %s [ID:%d] is preparing for a party, if you wish to join use (/joinparty)", pName, playerid);
	            SendClientMessageToAll(COLOR_YELLOW, str);
	            SendClientMessage(playerid, COLOR_WHITE, "You have prepared for a party correctly, now you must wait for atleast 5 people to arrive.");
	            GetPlayerPos(playerid, partyX, partyY, partyZ);
	            PartyPrepared = 1;
	        }
	    }
	}
	return 1;
}

COMMAND:joinparty(playerid, params[])
{
	if(PlayerDJ[playerid][pMember] != 1)
	{
	    if(PartyPrepared == 1)
	    {
			SetPlayerCheckpoint(playerid, partyX, partyY, partyZ, 6);
			SendClientMessage(playerid, COLOR_WHITE, "Get to the checkpoint to join the party fast, have fun and enjoy!");
	    }
	}
	return 1;
}

COMMAND:startparty(playerid, params[])
{
	if(PlayerDJ[playerid][pMember] == 1)
	{
	    if(PartyPrepared == 1)
	    {
	        if(IsPlayerInRangeOfPoint(playerid, 6, partyX, partyY, partyZ))
	        {
	            if(PplJoinParty >= 5)
	            {
	                new str[128], pName[MAX_PLAYER_NAME];
	            	GetPlayerName(playerid, pName, sizeof(pName));
	            	PartyOn = 1;
	            	PartyPrepared = 0;
	            	PplJoinParty = 0;
	            	format(str, sizeof(str), "DJ %s [ID:%d] has just started the party, catch up fast (Checkpoint disabled)", pName, playerid);
	            	SendClientMessageToAll(COLOR_YELLOW, str);
	            	ShowPlayerDialog(playerid, DIALOG_DJ, DIALOG_STYLE_LIST, "available DJ music", "1. Champagne showers - LMFAO\n2. I'm sexy and I know it - LMFAO\n3. I will not bow - Breaking Benjamin'\n4. Party Rock - LMFAO", "Start", "Cancel");
	            }
	        }
	    }
	}
	return 1;
}

COMMAND:stopparty(playerid, params[])
{
	if(PlayerDJ[playerid][pMember] == 1)
	{
	    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 459)
	    {
			if(PartyOn == 1)
			{
			    new str[128], pName[MAX_PLAYER_NAME];
	           	GetPlayerName(playerid, pName, sizeof(pName));
	           	PartyOn = 0;
            	format(str, sizeof(str), "DJ %s [ID:%d] has just stopped the party, good luck next time if you didn't catch it on time", pName, playerid);
            	SendClientMessageToAll(COLOR_YELLOW, str);
			}
	    }
	}
	return 1;
}

public OnPlayerUpdate(playerid)
{
        if(PartyPrepared == 1)
       {
	      for(new i = 0; i < MAX_PLAYERS; i++)
	      if(IsPlayerInRangeOfPoint(i, 6, partyX, partyY, partyZ))
	      {
	            PplJoinParty++;
	      }
        }
	return 1;
}

#endif
Reply


Messages In This Thread
Help {Script problem} - by Stanford - 07.08.2012, 22:34
Re: Help {Script problem} - by Jstylezzz - 07.08.2012, 23:12
Re: Help {Script problem} - by Stanford - 08.08.2012, 00:06
Re: Help {Script problem} - by Jstylezzz - 08.08.2012, 00:10
Re: Help {Script problem} - by Stanford - 08.08.2012, 02:02
Re: Help {Script problem} - by Jstylezzz - 08.08.2012, 02:15
Re: Help {Script problem} - by Stanford - 08.08.2012, 02:16

Forum Jump:


Users browsing this thread: 1 Guest(s)