Function GetPlayerIp help please -
Riwerry - 06.11.2013
Guys, how i can make this function correctly? I want to put it to registration, when'll player done register, it'll type his IP to my .ini. How should line look like?
INI_WriteInt (File, "IP", //I DONT KNOW HOW TO USE CORRECTLY GetPlayerIp function, I'm getting errors, jut post this);
Re: Function GetPlayerIp help please -
Konstantinos - 06.11.2013
pawn Код:
// get the IP first
new
sz_Ip[ 16 ]
;
GetPlayerIp( playerid, sz_Ip, 16 );
// create the file and write the ip into the file:
INI_WriteString( File, "IP", sz_Ip );
Ip is not an integer but a string.
EDIT: Replace the INI_WriteInt with INI_WriteString too.
Re: Function GetPlayerIp help please -
Riwerry - 06.11.2013
Gonna try it thx mate
//EDIT mate? How to solve this error? I have no idea.
C:\Users\Jakub\Desktop\Las Venturas Roleplay\gamemodes\LVRP.pwn(2

: error 020: invalid symbol name ""
C:\Users\Jakub\Desktop\Las Venturas Roleplay\gamemodes\LVRP.pwn(341) : warning 203: symbol is never used: ""
28 line
forward NacitavaniePouzivatelov (playerid, name [], value []);
I just tried to compile script, but it isn't caused by your code, it isn't already in script.
//EDIT 2 : NVM, I fixed it
Re: Function GetPlayerIp help please -
Konstantinos - 06.11.2013
Actually that error is given when a name is not valid. For example, when you declare variables it must start with a letter or underscore and not with a number. Is there anything else in lines 27-29?
Re: Function GetPlayerIp help please -
Riwerry - 06.11.2013
I fixed it, in provious line I got an uncompleted variable
//EDIT GetPlayerIp is already defined (but its not)
LINE:
new
sz_Ip[ 16 ]
;
GetPlayerIp( playerid, sz_Ip, 16 ); //THIS
Re: Function GetPlayerIp help please -
Riwerry - 06.11.2013
Hm?
Re: Function GetPlayerIp help please -
Konstantinos - 06.11.2013
You're missing bracket(s). Do undo and add the code in the register part without adding/removing brackets.
Re: Function GetPlayerIp help please -
Riwerry - 06.11.2013
I just added it to registration this string it works now ty mate, and can I ask you now how I can disable spawn button at register/login? Becouse when player registering or loging and he press "Spawn" button it spawns him, but register dialog still runs
Re: Function GetPlayerIp help please -
Konstantinos - 06.11.2013
https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
Toggling the spectating mode on, it makes the "Spawn" button not being shown.
Is the dialog still shown up? I'm not really sure why though but you can hide any shown dialog.
pawn Код:
// OnPlayerSpawn:
ShowPlayerDialog( playerid, -1, DIALOG_STYLE_MSGBOX, "_", "_", "_", "" );
Re: Function GetPlayerIp help please -
Riwerry - 06.11.2013
Mate tried, it's not bugging anymore, BUT how I can change camerapos or cameralookat?? While is this mode turn on.