SA-MP Forums Archive
Enter Origin on /createidcard - 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: Enter Origin on /createidcard (/showthread.php?tid=610031)



Enter Origin on /createidcard - 0B3Y - 19.06.2016

Can someone help me to make a script like enter the origin on creating id card, here's the command of create id card
Код:
CMD:createidcard(playerid, params[])
{
	if(PlayerInfo[playerid][pIdCard] != 0)
	{
	    SendClientMessageEx(playerid, COLOR_WHITE, "You already have a Id Card.");
	    return 1;
	}
	if(!IsPlayerInRangeOfPoint(playerid, 2, 361.8299,173.6550,1008.3828))
	{
	    SendClientMessageEx(playerid, COLOR_WHITE, "You are not at City Hall.");
	    return 1;
	}
	if(GetPlayerCash(playerid) < 25000)
	{
	    SendClientMessageEx(playerid, COLOR_WHITE, "You need $25000 to create a id card.");
	    return 1;
	}
	new string[128];
	new randomnumber = 1000000000 + random(8999999999);
	PlayerInfo[playerid][pIdCard] = randomnumber;
	format(string, sizeof(string), "You have successfully created a id card. (Serial Number: %d)", PlayerInfo[playerid][pIdCard]);
	SendClientMessageEx(playerid, COLOR_WHITE, string);
	GivePlayerCash(playerid, -25000);
	return 1;
}
The origin saving is
Код:
PlayerInfo[playerid][pOrigin] = 0;



Re: Enter Origin on /createidcard - 0B3Y - 19.06.2016

bump