SA-MP Forums Archive
Set first spawn money in Register Login script. - 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: Set first spawn money in Register Login script. (/showthread.php?tid=462788)



Set first spawn money in Register Login script. - julius013 - 08.09.2013

Hello, I want change the amount of money the player is going to receive after first registering to 5000$. The script has a lot of lines, so I have no idea how to do it.

Pastebin link:
http://pastebin.com/1pMdPsSE

P.S. Credits to hamptonin!!!


Re: Set first spawn money in Register Login script. - Konstantinos - 08.09.2013

pawn Код:
dcmd_register(playerid, params[])
{
    new string[128];
    if(!strlen(params)) return SendClientMessage(playerid, RED, "USAGE: /REGISTER [PASSWORD]   [PASSWORD MUST BE 6+ AND -25].");
    if((strlen(params) < 6 || strlen(params) > 25)) return SendClientMessage(playerid,RED,"Password must be 6+ and -25");
    if(Info[playerid][Registered]) return SendClientMessage(playerid,RED,"there is already a playerfile with yourname");
    dini_Create(GetFile(playerid)); SetInfo(playerid,"Registered",1); SetInfo(playerid,"Password",udb_hash(params)); SetInfo(playerid,"logged",1);
    format(string, 256, "You succesfully registered the nickname %s with password %s", Name(playerid), params); SetSInfo(playerid,"IP",PlayerIp(playerid));
    GivePlayerMoney(playerid, 5000); // Setting $5000
    SendClientMessage(playerid, YELLOW, string); Info[playerid][logged] = 1;
    SendClientMessage(playerid, YELLOW, "You have been automatically logged in!");
    return 1;
}



Re: Set first spawn money in Register Login script. - julius013 - 08.09.2013

Thank you.