16.04.2011, 01:04
kk.
under OnPlayerConnect
it says that arguement 3 is mismatched. heres the whole onplayerconnect:
that code is a tiny bit updated.
under OnPlayerConnect
pawn Код:
SetPVarInt(playerid, "Ip", IP);
pawn Код:
public OnPlayerConnect(playerid)
{
CountPlayersOnline(); //counts and prints the # of players online
SendConnectMessage(playerid); //sends the connect message
UsePlayerPedAnims(); //use player ped anims
GameTextForPlayer(playerid,"~R~PARTY TIME",3000,4); //game text
SendDeathMessage(playerid, INVALID_PLAYER_ID, 200);
AntiDeAMX(); //anti de-amx
new pname[128];
new file[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
new IP[16];
GetPlayerIp(playerid, IP, sizeof(IP));
if(!dini_Exists(file))
{
dini_Create(file);
dini_Set(file, "Ip", IP);
SetPVarInt(playerid, "Ip", IP);
dini_IntSet(file, "Score", 0);
dini_IntSet(file, "Money", 0);
dini_IntSet(file, "Kills", Killz[playerid]);
dini_IntSet(file, "Deaths", Deathz[playerid]);
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
else
{
new tmp;
tmp = dini_Int(file, "Ip");
if(tmp == GetPVarInt(playerid, "IP"))
{
SetPlayerScore(playerid, dini_Int(file, "Score"));
SetPlayerMoney(playerid, dini_Int(file, "Money"));
}
else
{
new string[128];
format(string, sizeof(string), "YOu arent the real %s, GTFO!", pname);
SendClientMessage(playerid, COLOR_RED, string);
Kick(playerid);
}
}
return 1;
}