Help me here its simple. - 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: Help me here its simple. (
/showthread.php?tid=244038)
Help me here its simple. -
Davz*|*Criss - 25.03.2011
Hey Scripters.
I know i am too lazy to post this cuz this is too noobish question.
I just forget to script this cuz i was having exams so i stopped scripting.
Code:-
pawn Код:
public OnPlayerConnect(playerid)
{
format(string,sizeof(string), "%s has joined the server, IP Address:- %s !", playerid, ip);
SendClientMessageToAll(0x33CCFFAA, string);
return 1;
}
And the Errors:-
pawn Код:
error 017: undefined symbol "string"
error 017: undefined symbol "string"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
I want this like ' OnPlayerConnect '
%s has joined the server, IP Address:- %s !
Player name and the IP address.
Thanks for ya helping.
It sends the message to all players.
Re: Help me here its simple. -
grand.Theft.Otto - 25.03.2011
right on top of
pawn Код:
format(string,sizeof(string), "%s has joined the server, IP Address:- %s !", playerid, ip);
Re: Help me here its simple. -
Davz*|*Criss - 25.03.2011
<REMOVED>
Re: Help me here its simple. -
aircombat - 25.03.2011
under OnPlayerConnect :
Код:
new pName[MAX_PLAYER_NAME],pIP[16];
GetPlayerIp(playerid,pIP,16);
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
new string[128];
format(string,sizeof(string),"%s Joined The Server (Ip : %d)",pName,pIP);
SendClientMessageToAll(COLOR_RED,string);
Re: Help me here its simple. -
Davz*|*Criss - 25.03.2011
Thanks Aircombat, Now it works fine well.
Thanks very much for your help.
Re: Help me here its simple. -
grand.Theft.Otto - 25.03.2011
Oh sorry, I was assuming you wanted to fix the 4 errors. Anyway, aircombat' answer is your solution.
Re: Help me here its simple. -
aircombat - 25.03.2011
Quote:
Originally Posted by Davz*|*Criss
Thanks Aircombat, Now it works fine well.
Thanks very much for your help. 
|
No Problem