Some Errors !
#1

pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(32) : error 010: invalid function or declaration
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 017: undefined symbol "muted"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : warning 215: expression has no effect
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 001: expected token: ";", but found "]"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : error 029: invalid expression, assumed zero
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(394) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
script
pawn Код:
32)new muted[MAX_PLAYERS];
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
394)    if(muted[playerid]) return 0;
    return 1;
}
Reply
#2

If I remember correctly, that function was removed, however if you still feel like you need it..

pawn Код:
public OnplayerPrivmsg(playerid, recieverid, text[])
{
new muted[MAX_PLAYERS] = 0; //Put this on the top of your script so you can use it in your mute command aswell.
if(muted[playerid] == 1) return 0;
return 1;
}
Of course you'll need to create a mute command that sets the variable muted[playerid] to 1.
Reply
#3

Put this under include's:
pawn Код:
new muted[MAX_PLAYERS];
OnPlayerPrivmsg:
pawn Код:
public OnplayerPrivmsg(playerid, recieverid, text[])
{
    if(muted[playerid] == 1) return 0;
    return 1;
}
Edit: Too late, and This callback was removed in SA-MP 0.3.
Reply
#4

1st: OnPlayerPrivmsg was removed in SA:MP 0.3, you cannot use it anymore, you can delete it

2nd: try

pawn Код:
new muted[MAX_PLAYERS] = 0;

public SomeCallback(playerid)
{
    if(muted[playerid] == 1) return SOMETHING;
    return 1;
}
When you /mute be sure to put this

pawn Код:
muted[playerid] = ;
Oh darn it, it seems I'm slow
Reply
#5

Guys i'm Really Sorry the problem was i just pressed the right printF button so it was on the top i removed it and done

and i added
pawn Код:
public OnPlayerText(playerid, text[])
{
if(muted[playerid] == 1) return 0;
return 1;
}
it works but onplayerprivmsg also worked :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)