Make Admin failure :D
#1

Hi, my rcon /makeadmin isnt working, so I'm going to try another way.

I had a failed attemt at OnPlayerConnect, and GetPlayerIp, and if the Ip was my ip, it would set them to admin.

If someone can just make a 3-5 line little thing under OnPlayerConnect to get my ip, and then what if(playerip ((or w/e)) is my IP, then it does a function.

Thanks
Reply
#2


pawn Код:
GetPlayerIp(playerid) == /*Your IP*/) {
//here make them admin and it should be done.
Yay 50th post i am now a 'Big Clucker' =D
Reply
#3

public OnPlayerConnect(playerid)
{
GetPlayerIp(playerid, [Your IP])

return 1;
}

I think thats right But don't do [Your IP] enter you IP there so it recognises it...

Make them admin first so it puts them that level...

It should be done...
Reply
#4

Quote:
Originally Posted by SampStunta
public OnPlayerConnect(playerid)
{
GetPlayerIp(playerid, [Your IP])

return 1;
}

I think thats right But don't do [Your IP] enter you IP there so it recognises it...

Make them admin first so it puts them that level...

It should be done...
I dont trust IP.
Any noob can chagne ti your/admin ip and be admin
Reply
#5

How would they know your IP?
Reply
#6

its just till we get the system figured out... brand new script here.
Reply
#7


Quote:

public OnPlayerConnect(playerid )
{
new serverownerip[16];
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
GetServerVarAsString("bind", serverownerip, sizeof(str));
if (!strcmp(plrIP, serverownerip))
{
//code
}
return 1;
}

PS: There was code like this on the wiki here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)