Can anyone help me?
#1

so i was making a script i got some error but i fixed but i dnt know why its not working.
Код:
#include <a_samp>
#include <streamer>
#if defined FILTERSCRIPT
#define announce
public OnFilterScriptInit()
 announce(playerid,params[]) {
    if(PlayerInfo[playerid][Level] >= 1) {
        CMDMessageToAdmins(playerid,"ANNOUNCE");
    	if(!strlen(params)) return SendClientMessage(playerid,red,"Syntax Error: \"/ANNOUNCE <TEXT>\".");
		return GameTextForAll(params,4000,3);
    } else return SendClientMessage(playerid,red,"ERROR: You need to be level 1 to use this command");
}

#endif
i am telling u whole script so it wil be easy to help me.
Reply
#2

Tell us the errors. I see a couple of wrong things but I want the errors.
Reply
#3

it give me no error
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#4

Quote:
Originally Posted by shaniyal
Посмотреть сообщение
it give me no error
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
If you used my code it won't give you errors indeed. Though I am unsure what the announce function is. Is it some custom function?
Reply
#5

u know about Luxadmin i was looking in his script and i found this announce so i copied it AND tryed to made my own script i made but it was giving me some errors first but when i fixed it and i puted it,i didnt work but if u need that .pwn file than i made i will send the link,do u want?
Reply
#6

anyone know this?
Reply
#7

Try this:
pawn Код:
#include <a_samp>
#include <streamer>
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#if defined FILTERSCRIPT

public OnPlayerCommandText(playerid, cmdtext[])
{
    dcmd(announce, 8, cmdtext);
    return 0;
}

dcmd_announce(playerid, params[])
{
    if(PlayerInfo[playerid][Level] >= 1)
    {
        CMDMessageToAdmins(playerid,"ANNOUNCE");
        if(!strlen(params)) return SendClientMessage(playerid,red,"Syntax Error: \"/ANNOUNCE <TEXT>\".");
        return GameTextForAll(params,4000,3);
    }
    else return SendClientMessage(playerid,red,"ERROR: You need to be level 1 to use this command");
}
#endif
Reply
#8

thx for helping me but if i get some problems i will contact u thx
Reply
#9

no sorry i didnt work
Reply
#10

make sure you've "#define FILTERSCRIPT" in the top of the script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)