SA-MP Forums Archive
Help On Scripting - 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)
+--- Thread: Help On Scripting (/showthread.php?tid=585847)



Help On Scripting - william2210 - 17.08.2015

This the code i put on under onplayertext
Quote:

}
new playname[MAX_PLAYER_NAME], ircMsg[256];
GetPlayerName(playerid, playname, sizeof(playname));
format(ircMsg, sizeof(ircMsg), "[%d]%s: %s", playerid, playname, text);
IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
return 1;
}

error code
Quote:

E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 6) : error 010: invalid function or declaration
E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 : error 010: invalid function or declaration

line 2656 format(ircMsg, "[%d] %s: %s", playerid, playname, text);
line 2658 return 1;


Re: Help On Scripting - fahlevy - 17.08.2015

try this .
Код:
}
	new playname[MAX_PLAYER_NAME], ircMsg[256];
	GetPlayerName(playerid, playname, sizeof(playname));
	format(ircMsg, sizeof(ircMsg), "[%d]%s: %s", playerid, playname, text);
	IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
	return 1;
}



Re: Help On Scripting - william2210 - 17.08.2015

Quote:

E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 5) : error 021: symbol already defined: "GetPlayerName"
E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 : error 010: invalid function or declaration

i get this

Edit:gwe indo


Re: Help On Scripting - william2210 - 17.08.2015

Plss Help


Re: Help On Scripting - ChromeAmazing - 17.08.2015

PHP код:
public OnPlayerText(playeridtext[])
{
    new 
playname[MAX_PLAYER_NAME], ircMsg[256];
    
GetPlayerName(playeridplaynamesizeof(playname));
    
format(ircMsgsizeof(ircMsg), "[%d] %s: %s"playeridplaynametext);
    
IRC_GroupSay(gGroupIDIRC_CHANNELircMsg);
    return 
0;




Re: Help On Scripting - william2210 - 17.08.2015

Quote:

error 021: symbol already defined: "OnPlayerText"

i got this


Re: Help On Scripting - ChromeAmazing - 17.08.2015

Remove everything in OnPlayertext even the public define and use this:

PHP код:
public OnPlayerText(playeridtext[]) 

    new 
playname[MAX_PLAYER_NAME], ircMsg[256]; 
    
GetPlayerName(playeridplaynamesizeof(playname)); 
    
format(ircMsgsizeof(ircMsg), "[%d] %s: %s"playeridplaynametext); 
    
IRC_GroupSay(gGroupIDIRC_CHANNELircMsg); 
    return 
0




Re: Help On Scripting - william2210 - 17.08.2015

I use satdm if i delete of OnPlayertext i will loose my function


Re: Help On Scripting - william2210 - 17.08.2015

Thx For Help
i delete the OnPlayerText function and replace with code

+rep


Re: Help On Scripting - william2210 - 17.08.2015

LEL WTF now my chat not showed in game :3 only showed on IRC can help?