Small help with my command. - 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: Small help with my command. (
/showthread.php?tid=583249)
Small help with my command. -
Sc0pion - 27.07.2015
Fixed!
Re: Small help with my command. -
PMH - 27.07.2015
Can you show ur pName stock function?
Try this too:
PHP код:
if(strcmp(cmd, "/clearaka", true) == 0)
{
if(AccInfo[playerid][Level] >= 1)
{
if(!strlen(params)) return
SendClientMessage(playerid, LIGHTBLUE, "[ USAGE: /clearaka (player<name/id>) ]") &&
SendClientMessage(playerid, LIGHTBLUE2, "[ FUNCTION: Will clear the AKA of the specified player. ]");
new player1 = strval(params);
if(AccInfo[player1][Level] == ServerInfo[MaxAdminLevel] && AccInfo[playerid][Level] != ServerInfo[MaxAdminLevel])
return SendClientMessage(playerid,red,"[ ERROR: You cannot use this command on this admin. ]");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
{
new tmp3[100], file[100], file1[100], Name[25];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerIp(player1,tmp3,50);
format(file,sizeof(file),"/Database/Config/aka.txt");
SendCommandToAdmins(playerid,"clearAKA");
dini_IntSet(file1,tmp3,Name);//This is where I get an error.
return 1;
}
else return ErrorMessages(playerid, 2);
}
else return ErrorMessages(playerid, 1);
}
Re: Small help with my command. -
Sc0pion - 27.07.2015
Fixed!
AW: Small help with my command. -
Macronix - 27.07.2015
This error occurs, because you want to set an integer value but player name is a string and not an integer
Re: Small help with my command. -
Sc0pion - 27.07.2015
Fixed!
AW: Small help with my command. -
Mencent - 27.07.2015
Hello!
PHP код:
dini_IntSet(file1,tmp3,Name);
to
PHP код:
dini_Set(file1,tmp3,pName(playerid));
Re: AW: Small help with my command. -
Sc0pion - 27.07.2015
Fixed!
AW: Small help with my command. -
Mencent - 27.07.2015
No you don't have it.
and
Re: Small help with my command. -
xVIP3Rx - 27.07.2015
Show me the stock/function that add names to the file.
Re: Small help with my command. -
Sc0pion - 27.07.2015
Fixed!