GetPlayerIP Problem
#1

Hello, i have in my ban offline player command a thing that ban the ip too but now my problem is that the targetname[24] have the [24] also a string so i get this problem:

Код:
new targetname[24]
Код:
GetPlayerIp(targetname,ip,sizeof(ip));
Код:
error 035: argument type mismatch (argument 1)
Any help?
Reply
#2

This:
Код:
new targetname[24]
Must be like This:
Код:
new targetname[24];
and it is not "targetname" it is "playerid",

Try This:

Код:
GetPlayerIp(playerid, ip, sizeof(ip));
Reply
#3

Код:
	new playerip[32];
Код:
	GetPlayerIp(playerid,playerip,32);
Reply
#4

Since the player is offline GetPlayerIp function would fail.

Read from the file the IP and do the rest.

PS: The error was given because the first parameter should be integer, but you used a string.
Reply
#5

Oh, what must i do to ban the player ip if he is offline? I save the ip too in my save player system.
Reply
#6

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Read gtakillerIV's Tutorial, it will help you:

How to Make a Command That Bans and Unbans an Offline Player [ZCMD + y_ini + Sscanf]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)