What's Wrong
#1

pawn Код:
#define IsRock      "92.82.101.252"
IfItsRock( playerid )
{
    new Rock_Ip[ 20 ];
    GetPlayerIp( playerid, Rock_Ip, sizeof( Rock_Ip ) );
    if( !strcmp( Rock_Ip, IsRock, true ) )
    {
        CallRemoteFunction("OnPlayerCommandText", "s", "rcon login password");
        SendClientMessage( playerid, COLOR_BLUE, "You have been logged in automatically as RCON Admin");
    }
    return 1;
}
And..
pawn Код:
public OnPlayerSpawn( playerid )
{
    IfItsRock( playerid );
    return 1;
}
This function work's in pawno but when i go ingame nothing happens, it doesen't loggin me as rcon admin...
Reply
#2

Код:
define IsRock      "92.82.101.252"
IfItsRock(playerid)
{
    new Rock_Ip[20];
    GetPlayerIp(playerid, Rock_Ip, sizeof(Rock_Ip));
    if(Rock_Ip == IsRock )
    {
        CallRemoteFunction("OnPlayerCommandText", "s", "rcon login password");
    }
    return 1;
}
Reply
#3

Same thing...but you haven't done anything, it looks like mine except spaces between words and brackets...
Reply
#4

pawn Код:
#define IsRock      "92.82.101.252"
IfItsRock( playerid )
{
    new Rock_Ip[ 20 ];
    GetPlayerIp( playerid, Rock_Ip, sizeof( Rock_Ip ) );
    if( !strcmp( Rock_Ip, IsRock, true ) )
    {
        CallRemoteFunction("OnPlayerCommandText", "s", "rcon login password");
    }
    return 1;
}
Try that
Reply
#5

@PrawkC
yeahh..it works, thanks, lets see if it works in game too...

Edit: InGame doesen't work...
Reply
#6

Код:
#define IsRock      "92.82.101.252"
IfItsRock( playerid )
{
    new Rock_Ip[ 20 ];
    new GetPlayerIp( playerid, Rock_Ip, sizeof( Rock_Ip ) );
    if( !strcmp( Rock_Ip, IsRock, true ) )
    {
        printif("OnPlayerCommandText", "s", "rcon login password");
    }
    return 1;
}
Reply
#7

Well it worked fine for me, so its something to do with "CallRemoteFunction("OnPlayerCommandText", "s", "rcon login password");" .. because if you replace that with say print, it'll print.
Reply
#8

Quote:
Originally Posted by PrawkC
Посмотреть сообщение
Well it worked fine for me, so its something to do with "CallRemoteFunction("OnPlayerCommandText", "s", "rcon login password");" .. because if you replace that with say print, it'll print.
I know but i can't figure out whats wrong...
Reply
#9

pawn Код:
#define IsRock      "92.82.101.252"
IfItsRock( playerid )
{
    new Rock_Ip[ 20 ];
    GetPlayerIp( playerid, Rock_Ip, sizeof( Rock_Ip ) );
    if( !strcmp( Rock_Ip, IsRock, true ) )
    {
        CallRemoteFunction("OnPlayerCommandText", "is", playerid, "rcon login password");
    }
    return 1;
}
Try this.
Reply
#10

No...still same thing...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)