SA-MP Forums Archive
how would i convert this 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how would i convert this command? (/showthread.php?tid=230399)



how would i convert this command? - Lethaal - 23.02.2011

how would i convert this command
Код:
  dcmd_register(playerid,params[]) {

    if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"{F81414}Your Already Registered!");
    if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"{F81414}Your Registered But Not Logged In Type /login [password]");
    if (strlen(params)==0) return SystemMsg(playerid,"{F81414}USAGE: /register [password]");
    if (udb_Create(PlayerName(playerid),params))
	{
	SystemMsg(playerid,"{6EF83C}Account Created! Now Use /login [password] To Login.");
	}
    return true;

 }

  dcmd_login(playerid,params[]) {

    if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Your Already Logged In!");
    if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"You Do Not Have An Account, Please /register [password]");
    if (strlen(params)==0) return SystemMsg(playerid,"USAGE: /login [password]");
    if (udb_CheckLogin(PlayerName(playerid),params)) {
       SetPlayerScore(playerid,dUserINT(PlayerName(playerid)).("score"));
  	   SetPlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money"));
  	   vip[playerid] = dUserINT(PlayerName(playerid)).("vip");
       PLAYERLIST_authed[playerid]=true;
   	   registerspawn[playerid] = 1;
	   SystemMsg(playerid,"{6EF83C}Thank you For Logging In Have Fun!");
	   loginspeak[playerid] = 1;

       return 1;
    }
    return SystemMsg(playerid,"{F81414}ERROR : Incorrect Password");
}
i want it into the basic command like

this is a example one

Код:
if (strcmp("/kill", cmdtext, true, 10) == 0)
	{   SetPlayerHealth(playerid,0);
		return 1;
	}
thanks


Re: how would i convert this command? - davelord - 23.02.2011

I would like to have this too!


Re: how would i convert this command? - Lethaal - 23.02.2011

cant find anything on the internet


AW: how would i convert this command? - Nero_3D - 23.02.2011

read the dcmd macro and understand it, afterwards it shouldnt be to hard to do that

But I advice to zcmd and sscanf 2.0


Re: AW: how would i convert this command? - Lethaal - 23.02.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
read the dcmd macro and understand it, afterwards it should be to hard to do that

But I advice to zcmd and sscanf 2.0
k but i rly just need these 2 cmds converted how long would it take 2 convert it?


Re: AW: how would i convert this command? - deather - 23.02.2011

Quote:

read the dcmd macro and understand it, afterwards it should be to hard to do that

Quote:
Originally Posted by Lethaal
Посмотреть сообщение
k but i rly just need these 2 cmds converted how long would it take 2 convert it?
It depends on how good & fast you are in understanding the dcmd macro.


Re: AW: how would i convert this command? - Lethaal - 23.02.2011

Quote:
Originally Posted by deather
Посмотреть сообщение
It depends on how good & fast you are in understanding the dcmd macro.
well i dont understand it lol need somebody to convert it for me hint hint >_>