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

you are using OnFilterScriptInit...
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
//^ that one is commented lol.. you need to uncomment it
uncomment the #define FILTERSCRIPT
it should work
Reply
#3

This showed up:
Quote:

C:\Users\TSC\Desktop\samp03e_svr_R2_win32\filtersc ripts\dj.pwn(131) : warning 203: symbol is never used: "IsNumeric"
C:\Users\TSC\Desktop\samp03e_svr_R2_win32\filtersc ripts\dj.pwn(131) : warning 203: symbol is never used: "ReturnUser"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

Here what did I do Jaris!, and it still doesnt work

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


#include <a_samp>
#include <a_samp>
#include <dini>
#include <utils>
#include <zones>
#include <yom_buttons>
#include <streamer>
#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
#4

the warnings mean, that you didn't use the names mentioned in the warning, you can delete that if you are not going to use them.
about the rest, what is exactly not working?
also, did you load the filterscript?
Reply
#5

Yes I did. But the problem that it says always "unknown command", and I loaded it 100 percent, and it still doesnt working, can u put the new script fixed and other stuff please. I'll appreciate that if you did it.

best regards: Edmund.
Reply
#6

I am helping someone else a.tm, but after that, i will do that
i will pm you the link when it's done
Reply
#7

Thanks man, Dont forget to PM me it! I'll be waiting you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)