[Help] How can i make this thing? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] How can i make this thing? (
/showthread.php?tid=253119)
[Help] how to make cmd /activate [naae] , activates when user is not connected also -
andruz99 - 04.05.2011
i made an enum called AccountActivated and it has been set 0 when you register
and i want to make that admin can only activate his account with command even if the player is not connected
to the server so if like admin types /activateaccount Jack_Black, then it will change the enum AccountActivated to 1
on his Jack_black.ini or .cfg file, how can i make like this, im really stuck here please help me.
Re: [Help] How can i make this thing? -
andruz99 - 05.05.2011
bump anyone `? i need help
Re: [Help] How can i make this thing? -
park4bmx - 05.05.2011
what do you use Dini/Y_ini.. .?
Re: [Help] How can i make this thing? -
andruz99 - 05.05.2011
i use dini, and my accounts folder is located: cServer/kasutajad/%.ini
Re: [Help] How can i make this thing? -
DRIFT_HUNTER - 05.05.2011
pawn Код:
CMD:activateaccount(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,red,"You need to be admin to use these command");//These is just for rcon admin so you edit it to your system
if(sscanf(params, "s", params)) return SendClientMessage(playerid,red,"You need to enter user nick");
new file[128];
format(file,sizeof(file),"cServer/kasutajad/%.ini",params); // edit .ini to your extansion
if(!dini_Exists(file)) return SendClientMessage(playerid,red,"That user does not exist");
dini_IntSet(file,"AccountActivated", 1);//I guess these is right you dont need to edit it
return 1;
}
I used zcmd+sscanf but you can edit it to whatever you want cos you know how is it works now
And i must note that these is just if player is not connected !
Re: [Help] How can i make this thing? -
andruz99 - 05.05.2011
Thank you very very much DRIFT_HUNTER,
Re: [Help] How can i make this thing? -
DRIFT_HUNTER - 05.05.2011
Quote:
Originally Posted by andruz99
Thank you very very much DRIFT_HUNTER,
|
Well first try it and see is it working and then say thx xD
And no problem just optimize it so its working when player is connected
Re: [Help] How can i make this thing? -
andruz99 - 05.05.2011
Its works