Help me here its simple.
#1

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.
Reply
#2

pawn Код:
new string[128];
right on top of

pawn Код:
format(string,sizeof(string), "%s has joined the server, IP Address:- %s !", playerid, ip);
Reply
#3

<REMOVED>
Reply
#4

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);
Reply
#5

Thanks Aircombat, Now it works fine well.

Thanks very much for your help.
Reply
#6

Oh sorry, I was assuming you wanted to fix the 4 errors. Anyway, aircombat' answer is your solution.
Reply
#7

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
Thanks Aircombat, Now it works fine well.

Thanks very much for your help.
No Problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)