PDA

View Full Version : Set first spawn money in Register Login script.


julius013
08/09/2013, 03:48 PM
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!!!

Konstantinos
08/09/2013, 03:54 PM
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;
}

julius013
08/09/2013, 06:21 PM
Thank you.