SA-MP Forums Archive
help - 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 (/showthread.php?tid=88169)



help - Criss_Angel - 24.07.2009

hai guys,

i want a save system so where a player leaves they spawn there next time. Yes, i have searched but i can't find it. Also i want /givegun to be defualt infinite ammo, so how i edit this no just make it 99999999:

Код:
if(strcmp(cmd, "/givegun", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /givegun [playerid/PartOfName] [weaponid(eg. 46 = Parachute)] 99999999");
				return 1;
			}
			new playa;
			new gun;
			new ammo;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			gun = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givegun [playerid/PartOfName] [weaponid] [ammo]");
				SendClientMessage(playerid, COLOR_GRAD4, "3(Club) 4(knife) 5(bat) 6(Shovel) 7(Cue) 8(Katana) 10-13(Dildo) 14(Flowers) 16(Grenades) 18(Molotovs) 22(Pistol) 23(SPistol)");
				SendClientMessage(playerid, COLOR_GRAD3, "24(Eagle) 25(shotgun) 29(MP5) 30(AK47) 31(M4) 33(Rifle) 34(Sniper) 37(Flamethrower) 41(spray) 42(exting) 43(Camera) 46(Parachute)");
				return 1;
			}
			if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==35||gun==36||gun==39||gun==40||gun==44||gun==45)
			{ SendClientMessage(playerid, COLOR_GRAD1, "  wrong WeaponID!"); return 1; }
			tmp = strtok(cmdtext, idx);
			ammo = strval(tmp);
			if(ammo > 99999999)
			{ SendClientMessage(playerid, COLOR_GRAD1, "  dont go below 1 or above 999999999 bullets!"); return 1; }
			if (PlayerInfo[playerid][pAdmin] >= 1337)
			{
			  if(IsPlayerConnected(playa))
			  {
			    if(playa != INVALID_PLAYER_ID)
			    {
						SafeGivePlayerWeapon(playa, gun, ammo);
						GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, 256, "AdmWarning: %s has given %s gun id %d.", sendername,giveplayer,gun);
						ABroadCast(COLOR_YELLOW,string,1);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");
			}
		}
		return 1;
	}
it would be really helpful if you could help me.


Re: help - refshal - 24.07.2009

Please don't spam with creating topics about the same again and again and again... This is the second one. But anyways, I will work on a script right now with infinite ammo. And then I'll release it.


Re: help - Moustafa - 24.07.2009

Like eddy wasn't doing that when he was very noob, stop laming noobs because you was one before, and you're still one in some stuff.


Re: help - Criss_Angel - 24.07.2009

Shut up mustafa , and thanks eddy you are great . Also does anyone know where i can get a save system.


Re: help - James_Alex - 24.07.2009

Quote:
Originally Posted by Moustafa
Like eddy wasn't doing that when he was very noob, stop laming noobs because you was one before, and you're still one in some stuff.
lol ! all we was noobs


Re: help - Criss_Angel - 24.07.2009

Quote:
Originally Posted by James_Alex(Coder)
Quote:
Originally Posted by Moustafa
Like eddy wasn't doing that when he was very noob, stop laming noobs because you was one before, and you're still one in some stuff.
lol ! all we was noobs
Yes, everyone has to start at the beginning and noob means newbie and even you where one mustafa so STFU. Anyways does anyone know the link to a save system?


Re: help - James_Alex - 24.07.2009

Quote:
Originally Posted by Criss_Angel
Quote:
Originally Posted by James_Alex(Coder)
Quote:
Originally Posted by Moustafa
Like eddy wasn't doing that when he was very noob, stop laming noobs because you was one before, and you're still one in some stuff.
lol ! all we was noobs
Yes, everyone has to start at the beginning and noob means newbie and even you where one mustafa so STFU. Anyways does anyone know the link to a save system?
explain plz
saving what ?


Re: help - Criss_Angel - 24.07.2009

Quote:
Originally Posted by James_Alex(Coder)
Quote:
Originally Posted by Criss_Angel
Quote:
Originally Posted by James_Alex(Coder)
Quote:
Originally Posted by Moustafa
Like eddy wasn't doing that when he was very noob, stop laming noobs because you was one before, and you're still one in some stuff.
lol ! all we was noobs
Yes, everyone has to start at the beginning and noob means newbie and even you where one mustafa so STFU. Anyways does anyone know the link to a save system?
explain plz
saving what ?
As in someone quits in the star tower , next time they login they spawn at the star toweer


Re: help - [TouchX]Ash - 24.07.2009

To avoid confusion when someone helps him, he's using a Godfather edit.


Re: help - Criss_Angel - 24.07.2009

Quote:
Originally Posted by Ash0153
To avoid confusion when someone helps him, he's using a Godfather edit.
yes, La-RP edit with mySql