Help needed -
sggassasin - 07.12.2009
i have this code but when i go to the place nothing happens
Код:
public playercheck(playerid)
{
if (PlayerToPoint(6.0, playerid,2220.5750,808.9727,37.2171))
{
if (ifplayerenterhf[playerid]== 1)
{
SendClientMessage(playerid,0xDEEE20FF, "You Have To Wait 2 days");
}
else
{
GivePlayerMoney(playerid, 500000);
SetTimer("Resetter", 172800000, 0);// 2 days
SendClientMessage(playerid,0xDEEE20FF, "You GOT HALF A MILL OMG WOW ..... now wait 2 days Ha Ha ");
ifplayerenterhf[playerid] = 1;
}
}
return 1;
}
also this is some warning that i think might not help
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SM.pwn(266) : warning 235: public function lacks forward declaration (symbol "Resetter")
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SM.pwn(274) : warning 235: public function lacks forward declaration (symbol "PlayerToPoint")
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SM.pwn(289) : warning 235: public function lacks forward declaration (symbol "playercheck")
Re: Help needed -
sggassasin - 07.12.2009
iv still got the same problem and i also have this problem
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\SM.pwn(481) : error 017: undefined symbol "GetPlayerId"
and thats connected to this line...
new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);
could someone help plz
and this is the script that the line was in ...
Код:
dcmd_makeprivet(playerid, params[])
{
#pragma unused params
if(gPlayerInfo[playerid][PLAYER_ADMIN] == 1)
{
new id = (isNumeric(params)) ? strval(params) : GetPlayerId(params);
if(IsPlayerConnected(id) && id != playerid)
{
gPlayerInfo[playerid][PLAYER_PRIVET] = 1;
new string[150];
format(string, sizeof(string), "You have been V.I.P Membership by administrator \'%s\'.", gPlayerInfo[playerid][PLAYER_NAME]);
SendClientMessage(id, COLOUR_ORANGE, string);
format(string, sizeof(string), "You have successfully Gave \'%s\' V.I.P Membership.", gPlayerInfo[id][PLAYER_NAME]);
}
}
else
{
SendClientMessage(playerid, COLOUR_LIGHTBLUE, "You Are Not An Admin Member");
}
}
Re: Help needed -
Deat_Itself - 07.12.2009
you havent pasted full command just paste it again !
Re: Help needed -
sggassasin - 07.12.2009
that is the full command and i fixed it but now i have this problem.......
Код:
dcmd_register(playerid, params[])
{
if(gPlayerInfo[playerid][PLAYER_REGGED] == 1)
return SendClientMessage(playerid, COLOUR_ORANGE, "ERROR: You have already registered!");
else if(!params[0])
return SendClientMessage(playerid, COLOUR_ORANGE, "USAGE: /register [password]");
/*else if(strlen(params) < gSettings[PASS_MIN] || strlen(params) > gSettings[PASS_MAX])
{
new string[200];
format(string, sizeof(string), "ERROR: Password must be between %d and $d characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);
return SendClientMessage(playerid, COLOUR_ORANGE, string);
}*/
else
{
new password = num_hash(params);
gPlayerInfo[playerid][PLAYER_PASS] = password;
gPlayerInfo[playerid][PLAYER_REGGED] = 1;
gPlayerInfo[playerid][PLAYER_LOGGED] = 1;
GetPlayerIp(playerid, gPlayerInfo[playerid][PLAYER_IP], 16);
new string[256]; format(string, sizeof(string), "You have successfully registered your account with the password \'%s\'. You have been automatically logged in.", params);
return SendClientMessage(playerid, COLOUR_LIGHTBLUE, string);
}
}
now when i register and restart the match it dont save it
Re: Help needed -
Abernethy - 07.12.2009
By the looks of this, you aren't actually saving these to files. Just variables.
Re: Help needed -
sggassasin - 07.12.2009
Код:
public OnPlayerConnect(playerid)
{
new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
if(!dini_Exists(file)) {
dini_Create(file);
dini_Set(file,"Name",Name);
dini_Set(file,"Ip",Ip);
dini_IntSet(file,"Registered",-1);
dini_IntSet(file,"Password",0);
dini_IntSet(file,"Wired",0);
dini_IntSet(file,"Jailed",0);
dini_IntSet(file,"Privet",0);
dini_IntSet(file,"Admin",0);
SendClientMessage(playerid,COLOUR_ORANGE,"You're username is not recognized on this server. Please /register to continue.");
}
strcat(gPlayerInfo[playerid][PLAYER_NAME], dini_Get(file,"Name"));
strcat(gPlayerInfo[playerid][PLAYER_IP], dini_Get(file,"Ip"));
gPlayerInfo[playerid][PLAYER_REGGED] = dini_Int(file,"Registered");
gPlayerInfo[playerid][PLAYER_PASS] = dini_Int(file,"Password");
gPlayerInfo[playerid][PLAYER_WIRED] = dini_Int(file,"Wired");
gPlayerInfo[playerid][PLAYER_JAILED] = dini_Int(file,"Jailed");
gPlayerInfo[playerid][PLAYER_PRIVET] = dini_Int(file,"Privet");
gPlayerInfo[playerid][PLAYER_ADMIN] = dini_Int(file,"Admin");
if(gPlayerInfo[playerid][PLAYER_REGGED] == 0) SendClientMessage(playerid,COLOUR_ORANGE,"You're username is recognised on this server, but you have not registered. Please /register to continue.");
else if(gPlayerInfo[playerid][PLAYER_REGGED] == 1) SendClientMessage(playerid,COLOUR_ORANGE,"You're username is recognised on this server. Please /login to continue.");
gPlayerInfo[playerid][PLAYER_REGGED] = 0;
DOS_OnPlayerConnect(playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file[100];
format(file,sizeof(file),PlayerFile,gPlayerInfo[playerid][PLAYER_NAME]);
dini_Set(file,"Name",gPlayerInfo[playerid][PLAYER_NAME]);
dini_Set(file,"Ip",gPlayerInfo[playerid][PLAYER_IP]);
dini_IntSet(file,"Registered",gPlayerInfo[playerid][PLAYER_REGGED]);
dini_IntSet(file,"Password",gPlayerInfo[playerid][PLAYER_PASS]);
dini_IntSet(file,"Admin",gPlayerInfo[playerid][PLAYER_ADMIN]);
dini_IntSet(file,"Wired",gPlayerInfo[playerid][PLAYER_WIRED]);
dini_IntSet(file,"Jailed",gPlayerInfo[playerid][PLAYER_JAILED]);
dini_IntSet(file,"Privet",gPlayerInfo[playerid][PLAYER_PRIVET]);
gPlayerInfo[playerid][PLAYER_NAME] = 0;
gPlayerInfo[playerid][PLAYER_IP] = 0;
gPlayerInfo[playerid][PLAYER_REGGED] = 0;
gPlayerInfo[playerid][PLAYER_LOGGED] = 0;
gPlayerInfo[playerid][PLAYER_PASS] = 0;
gPlayerInfo[playerid][PLAYER_ADMIN] = 0;
gPlayerInfo[playerid][PLAYER_WIRED] = 0;
gPlayerInfo[playerid][PLAYER_JAILED] = 0;
gPlayerInfo[playerid][PLAYER_PRIVET] = 0;
DOS_OnPlayerDisconnect(playerid);
return 1;
}
thats my hole saveing file thingy