11.03.2010, 16:14
Hey, i was trying to do so if the server get's my ip it would say ADMIN: %s joined.
but i get this error:
This is my script:
but i get this error:
Код:
(105) : error 033: array must be indexed (variable "playerip")
Код:
public OnPlayerConnect(playerid) { new playerip[16]; GetPlayerIp(playerid,playerip,sizeof(playerip)); if(playerip == [my ip]) { new name[MAX_PLAYER_NAME],string[32]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"ADMIN: %s joined",name); SendClientMessageToAll(COLOUR_LIGHTBLUE,string); PlayerPlaySound(playerid,1185,0,0,0); SendClientMessage(playerid,COLOUR_YELLOW,"Welcome admin!"); return 1; } else { new name[MAX_PLAYER_NAME],string[32]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"PLAYER: %s joined",name); SendClientMessageToAll(COLOUR_LIGHTBLUE,string); return 1; } }