How do i make this cmd to save into a .cfg file ?
#1

Hello i got this command, but how do i make it saving it into a .cfg file or something alike that so when im doing /gmx it will stay the same registration plates ?

Код:
if(strcmp(cmd, "/regplate", true) == 0)
	{
  	tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /regplate [playerid/PartOfName] [xx-xxx-xxx]");
		}
		giveplayerid = ReturnUser(tmp);
		if (PlayerInfo[playerid][pAdmin] >= 1)
		{
			if(IsPlayerConnected(giveplayerid))
			{
			  if(giveplayerid != INVALID_PLAYER_ID)
			  {
				  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					new length = strlen(cmdtext);
					while ((idx < length) && (cmdtext[idx] <= ' '))
					{
						idx++;
					}
					new offset = idx;
					new result[64];
					while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
					{
						result[idx - offset] = cmdtext[idx];
						idx++;
					}
					result[idx - offset] = EOS;
					if(!strlen(result))
					{
						return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /regplate [playerid/PartOfName] [xx-xxx-xxx]");
					}
					if(IsPlayerInAnyVehicle(playerid))
					{
					  new vehicleid = GetPlayerVehicleID(playerid);
					  new Text3D:VText;
					  format(string,sizeof(string),"%s",(result));
						VText = Create3DTextLabel(string,0x008080FF,0.0,0.0,0.0,20,0,1);
						Attach3DTextLabelToVehicle(Text3D:VText, vehicleid, 0.0, 0.0, 0.0);
					}
					return 1;
				}
			}
			else
			{
				format(string, sizeof(string), "  %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
Reply


Messages In This Thread
How do i make this cmd to save into a .cfg file ? - by Chivava - 05.02.2010, 21:40
Re: How do i make this cmd to save into a .cfg file ? - by Chivava - 06.02.2010, 07:49
Re: How do i make this cmd to save into a .cfg file ? - by Perker12345 - 06.02.2010, 08:16
Re: How do i make this cmd to save into a .cfg file ? - by Chivava - 06.02.2010, 08:41
Re: How do i make this cmd to save into a .cfg file ? - by Perker12345 - 06.02.2010, 08:44
Re: How do i make this cmd to save into a .cfg file ? - by Chivava - 06.02.2010, 08:48
Re: How do i make this cmd to save into a .cfg file ? - by MadeMan - 06.02.2010, 09:24
Re: How do i make this cmd to save into a .cfg file ? - by Perker12345 - 06.02.2010, 10:23
Re: How do i make this cmd to save into a .cfg file ? - by MadeMan - 06.02.2010, 10:26
Re: How do i make this cmd to save into a .cfg file ? - by Perker12345 - 06.02.2010, 10:30
Re: How do i make this cmd to save into a .cfg file ? - by MadeMan - 06.02.2010, 10:33
Re: How do i make this cmd to save into a .cfg file ? - by Perker12345 - 06.02.2010, 10:41
Re: How do i make this cmd to save into a .cfg file ? - by MadeMan - 06.02.2010, 10:48
Re: How do i make this cmd to save into a .cfg file ? - by Chivava - 06.02.2010, 11:01
Re: How do i make this cmd to save into a .cfg file ? - by MadeMan - 06.02.2010, 11:02
Re: How do i make this cmd to save into a .cfg file ? - by Chivava - 07.02.2010, 13:22
Re: How do i make this cmd to save into a .cfg file ? - by adytzu32 - 11.03.2010, 14:45
Re: How do i make this cmd to save into a .cfg file ? - by adytzu32 - 11.03.2010, 18:01
Re: How do i make this cmd to save into a .cfg file ? - by yvaxxx - 27.03.2010, 09:01

Forum Jump:


Users browsing this thread: 6 Guest(s)