Page 1 of 1

Game mode

Posted: 10 Apr 2010, 11:48
by Thunder[1337]
Kāds var iedot linku uz pamācību kā izveidot savu game mode?

Paldies jau iepriekš

Re: Game mode

Posted: 10 Apr 2010, 14:09
by wiesis
nav tādas pamācibas ;) wnk katrā rindiņa liec ko tev vajag tajā gamemode ;)

Piem.

Code: Select all

public OnPlayerCommandText(playerid, cmdtext[])
{
Liec visu ko tev vajag piemēram

Code: Select all

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext, "/lock", true)==0)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		new State=GetPlayerState(playerid);
		if(State!=PLAYER_STATE_DRIVER)
		{
			SendClientMessage(playerid,0xFF004040,"Vienigi Auto Vaditajs var aizselgt durvis.");
			return 1;
		}
		new i;
		for(i=0;i<MAX_PLAYERS;i++)
		{
			if(i != playerid)
			{
				SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
			}
		}
		SendClientMessage(playerid, 0xFF0000FF , "Masina Aizslegta!");
		new Float:pX, Float:pY, Float:pZ;
		GetPlayerPos(playerid,pX,pY,pZ);
		PlayerPlaySound(playerid,1056,pX,pY,pZ);
	}
	else
	{
	SendClientMessage(playerid, 0xFF004040, "Tu neatrodies masina!");
	}
	return 1;
}
	if (strcmp(cmdtext, "/unlock", true)==0)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		new State=GetPlayerState(playerid);
		if(State!=PLAYER_STATE_DRIVER)
		{
			SendClientMessage(playerid,0xFF004040,"Vienigi Auto Vaditajs var atslegt durvis.");
			return 1;
		}
		new i;
		for(i=0;i<MAX_PLAYERS;i++)
		{
			SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
		}
		SendClientMessage(playerid, 0x33AA33AA, "Masina Atslegta!");
		new Float:pX, Float:pY, Float:pZ;
		GetPlayerPos(playerid,pX,pY,pZ);
		PlayerPlaySound(playerid,1057,pX,pY,pZ);
	}
	else
	{
	SendClientMessage(playerid, 0xFF004040, "Tu neatrodies mashina");
	}
	return 1;
  }
    return 1;
  }

Laikam šītā ;) šajā gadijumā tu ieliki /lock /unlock scriptu gamemode ;)

Bet daudziem scriptiem ir new piemers
to wnk ieliec pašā augšā pie new ;)

Re: Game mode

Posted: 10 Apr 2010, 14:25
by bobiksv6k[1337]
Wiesi, ja nezini, tad paklusē. Tepat boxg ir atrodama pamācība. Tikai vajag meklēt.
viewtopic.php?t=749

Re: Game mode

Posted: 10 Apr 2010, 14:55
by Thunder[1337]
Paldies :)

Re: Game mode

Posted: 10 Apr 2010, 20:00
by wiesis
izlasi ko viņš gribēja ;) viņš gribēja izveidot savu game mode nevis uzlabot sftdm.pwn

Re: Game mode

Posted: 10 Apr 2010, 20:14
by Thunder[1337]
Nu bet tas arī kaut cik der

Re: Game mode

Posted: 10 Apr 2010, 22:30
by bobiksv6k[1337]
Tā uzlabošana ir visam pamats. No tā var saprast, kas ir kas.
No tā sftdm viņš arī varēs sataisīt savu game modu tādu, kāds viņam patīk.