Jump to content
  • 0

Problema FS !


CoSmInUuTzZ

Question

Salut folosesc acest fs : [pawn]public OnPlayerConnect(playerid) {

// Facem test la nickname daca este cel al adminului

new Username[MAX_PLAYER_NAME];

GetPlayerName(playerid, Username, sizeof(Username));

if(strfind(Username, "[sGM]eXtreMe", true) != -1){//Schimba pe numele tau

// Controleaza daca ipul apartine adminului

new IPADMIN[16];

GetPlayerIp(playerid, IPADMIN, 16);

if(!strcmp(IPADMIN, "127.0.0.1")){// daca aveti ip dinamic folositi in felul urmator exemplu: 93.116.*.*

return 1;

}

else{

SendClientMessage(playerid, 0xAA3333AA, "# COL_LIGHTBLUE [bAN] #COL_WHITE  Folosesti nume de admin"); // Mesajul care va fi afisat daca va intra un player cu numele adminului

Ban(playerid); }// Daca doresti poti schimba pe kick

return 0;

}

return 1;

} [/pawn]

Dar imi da ban chiar daca pun ip meu si numele meu imi puteti spune de ce?

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

public OnPlayerConnect ( playerid )

{

new

username [ MAX_PLAYER_NAME ] ,

adminip  [      16        ]

;

GetPlayerName ( playerid , username , sizeof ( username ) ) ;

if ( strfind ( username , "Darky" , true ) != -1 ) // Schimba Darky cu nickname-ul tau de joc.

{

GetPlayerIp ( playerid , adminip , 16 ) ;

if ( !strcmp ( adminip , "127.0.0.1" ) ) // Aici schimba localhost-ul cu IP-ul tau.

{

return ( 1 ) ;

}

else

{

        #define SCM  SendClientMessage

SCM ( playerid , -1 , "* Folosesti un nickname 'interzis' pe care doar administratorii il pot folosi." ) ;

Ban ( playerid ) ;

}

return ( 0 ) ;

}

return  ( 1 ) ;

}

Link to comment
Share on other sites

public OnPlayerConnect ( playerid )

{

new

username [ MAX_PLAYER_NAME ] ,

adminip  [      16        ]

;

GetPlayerName ( playerid , username , sizeof ( username ) ) ;

if ( strfind ( username , "Darky" , true ) != -1 ) // Schimba Darky cu nickname-ul tau de joc.

{

GetPlayerIp ( playerid , adminip , 16 ) ;

if ( !strcmp ( adminip , "127.0.0.1" ) ) // Aici schimba localhost-ul cu IP-ul tau.

{

return ( 1 ) ;

}

else

{

        #define SCM  SendClientMessage

SCM ( playerid , -1 , "* Folosesti un nickname 'interzis' pe care doar administratorii il pot folosi." ) ;

Ban ( playerid ) ;

}

return ( 0 ) ;

}

return  ( 1 ) ;

}

Tot asa face imi da ban si am modificat numele si ip`ul

Link to comment
Share on other sites

NexT." post="136111" timestamp="1363857752"]

Folositi Pawn Code ca deaia exista nu sa aveti voi fite vai  :rolleyes: si nu ma refer doar la tine.

Tu ar trebuii sa termini ca ai inceput sa o umezesti.

La BBC-ul pawn este un bug, deci daca nu stii nu mai comenta aiurea.

Si mie unul imi place sa fac asa, arata mult mai bine, ai vreo problema cu asta?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.