if u dont login u get kicked dont work - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: if u dont login u get kicked dont work (
/showthread.php?tid=351886)
if u dont login u get kicked dont work -
thefatshizms - 17.06.2012
ONplayerspawn
pawn Code:
public OnPlayerSpawn(playerid)
{
new englandcp;
new russiancp;
new file[26];
SetPlayerInterior(playerid, 0);
englandcp = CreateDynamicCP(247.9255,1859.3064,14.0840, 2, -1, -1, -1);
russiancp = CreateDynamicCP(-340.0471,1543.2358,75.5625, 2, -1, -1, -1);
if(!dini_Exists(file))
{
SendClientMessage(playerid, -1, "You need to login");
PInfo[playerid][Preg] =1;
PInfo[playerid][Ploged] =0;
PInfo[playerid][Banned] =0;
Kick(playerid);
return 1;
}
return 1;
}
its not working if i login it still kicks me
Re: if u dont login u get kicked dont work -
ViniBorn - 17.06.2012
file isn't formated...
Ex:
pawn Code:
format(file, sizeof file, "%s.ini",PlayerName);
Re: if u dont login u get kicked dont work -
thefatshizms - 17.06.2012
i formatted it now but still kicks me when i login
Re: if u dont login u get kicked dont work -
ViniBorn - 17.06.2012
The file has been created?
Show your new code
Re: if u dont login u get kicked dont work -
thefatshizms - 17.06.2012
pawn Code:
new englandcp;
new russiancp;
SetPlayerInterior(playerid, 0);
englandcp = CreateDynamicCP(247.9255,1859.3064,14.0840, 2, -1, -1, -1);
russiancp = CreateDynamicCP(-340.0471,1543.2358,75.5625, 2, -1, -1, -1);
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file),"FatAdmin/Users/%s.ini,name");
if(!dini_Exists(file))
{
SendClientMessage(playerid, -1, "You need to login");
PInfo[playerid][Preg] =1;
PInfo[playerid][Ploged] =0;
PInfo[playerid][Banned] =0;
Kick(playerid);
return 1;
}
return 1;
}
Re: if u dont login u get kicked dont work -
ViniBorn - 17.06.2012
Replace
pawn Code:
format(file, sizeof(file),"FatAdmin/Users/%s.ini,name");
pawn Code:
//new file[44];
format(file, sizeof(file),"FatAdmin/Users/%s.ini",name);
Re: if u dont login u get kicked dont work -
Audi_Quattrix - 17.06.2012
maybe OnPlayerSpawn
pawn Code:
if (PInfo[playerid][Ploged] == 0) return Kick(playerid);