Need help with a script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with a script (
/showthread.php?tid=226046)
Need help with a script -
showarn - 14.02.2011
Hello i get error and i understand i need to forward somthing can you guys show me how the line should be ? if any1 now how to solve this please let me now
pawn Код:
C:\Users\Alex\Desktop\Ownmade GM\gamemodes\Swedish.pwn(212) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 4560 bytes
Code size: 165712 bytes
Data size: 219460 bytes
Stack/heap size: 16384 bytes; estimated max. usage=5318 cells (21272 bytes)
Total requirements: 406116 bytes
1 Warning.
Line 212
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
Re: Need help with a script -
Face9000 - 14.02.2011
Remove that line.
Re: Need help with a script -
showarn - 14.02.2011
This line?
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[]) {
Re: Need help with a script -
showarn - 14.02.2011
where should i place this script than?
pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
if(!IsPlayerConnected(playerid)||!IsPlayerConnected(recieverid)) return 1;
new string[256], ToName[24], Name[24]; GetPlayerName(playerid,Name,24);
if(Config[ExposePMS]) {
GetPlayerName(recieverid,ToName,24);
format(string,256,"PM: %s [%d] -> %s [%d]: %s",Name,playerid,ToName,recieverid,text);
SendMessageToAdmins(string);
}
if(Config[WireWithPM] && Variables[playerid][Wired]) {
Variables[playerid][WiredWarnings]--;
if(Variables[playerid][WiredWarnings]) {
format(string,256,"You have been wired thus preventing you from talking and PMing. [Warnings: %d/%d]",Variables[playerid][WiredWarnings],Config[WiredWarnings]);
SendClientMessage(playerid,white,string); return 0;
}
else {
format(string,256,"%s has been kicked from the server. [REASON: Wired]",Name);
SendClientMessageToAll(yellow,string); SetUserInt(playerid,"Wired",0);
Kick(playerid); return 0;
}
}
return 1;
}
Re: Need help with a script -
bartje01 - 14.02.2011
YOu probaly already have a
public OnPlayerPrivmsg(playerid, recieverid, text[])
So put your code inside the
public OnPlayerPrivmsg(playerid, recieverid, text[]) that already exists
Re: Need help with a script - [L3th4l] - 14.02.2011
You are using an outdate GM that uses that old function.
Try:
pawn Код:
forward OnPlayerPrivmsg(playerid, recieverid, text[]);
Re: Need help with a script -
Face9000 - 15.02.2011
Yes.