Jump to content
  • 0

pomoc RANDOM spoustec


W1nCZ

Dotaz

public police(playerid)
{
switch(policeskin)
{
	case 1:
	{
		SetPlayerSkin(playerid, 265);
	}
	case 2:
	{
		SetPlayerSkin(playerid, 266);
	}
	case 3:
	{
		SetPlayerSkin(playerid, 267);
	}
}
}

 

toto potrebuju spusti ... a neviem ak :d poradite?

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0

 

public police(playerid)
{
switch(policeskin)
{
	case 1:
	{
		SetPlayerSkin(playerid, 265);
	}
	case 2:
	{
		SetPlayerSkin(playerid, 266);
	}
	case 3:
	{
		SetPlayerSkin(playerid, 267);
	}
}
}

 

toto potrebuju spusti ... a neviem ak :d poradite?

 

 

 

public OnGameModeInit() //pokud to ma byt FS tak OnFilterScriptInit()
{
   SetTimer("police",6000,true)//spusti timer pro public "police" po 6 sekundach, true = opakovane .... pokud neopakovane tak false
   return 1;
}

forward police(playerid);

public police(playerid)
{
   switch(policeskin)
   {
    case 1: SetPlayerSkin(playerid, 265);
    case 2: SetPlayerSkin(playerid, 266);
    case 3: SetPlayerSkin(playerid, 267);
   }
   return 1;
}

 

EDIT: //esi to mas pri pripojeni tak v tomto pripade bych to zbytecne nedelal pres public a timer

Link to comment
Share on other sites

  • 0
public police(playerid)
{
switch(policeskin)
{
	case 1:
	{
		SetPlayerSkin(playerid, 265);
	}
	case 2:
	{
		SetPlayerSkin(playerid, 266);
	}
	case 3:
	{
		SetPlayerSkin(playerid, 267);
	}
}
}

 

toto potrebuju spusti ... a neviem ak :d poradite?

 

 

 


public OnGameModeInit() //pokud to ma byt FS tak OnFilterScriptInit()
{
SetTimer("police",6000,true)//spusti timer pro public "police" po 6 sekundach, true = opakovane .... pokud neopakovane tak false
return 1;
}

public police(playerid)
{
switch(policeskin)
{
case 1: SetPlayerSkin(playerid, 265);
case 2: SetPlayerSkin(playerid, 266);
case 3: SetPlayerSkin(playerid, 267);
}
}

 

Nechapem ... preco settimer... potřebuju aby když dam prvni listitem v dialogu... aby to hraci dalo nahodne jeden ze 3 skinu... nebo to je ono ?

Link to comment
Share on other sites

  • 0

tak staci napsat... v tomto pripade napis:

if(listitem == 1)
{
   SetTimer("police",1000,false);
}

 

btf proc to delas tak slozite... staci i:

if(listitem == 1)
{
   switch(policeskin)
   {
       case 1: SetPlayerSkin(playerid, 265);
       case 2: SetPlayerSkin(playerid, 266);
       case 3: SetPlayerSkin(playerid, 267);
   }
}

Link to comment
Share on other sites

  • 0

tak staci napsat... v tomto pripade napis:


if(listitem == 1)
{
SetTimer("police",1000,false);
}

 

btf proc to delas tak slozite... staci i:


if(listitem == 1)
{
switch(policeskin)
{
case 1: SetPlayerSkin(playerid, 265);
case 2: SetPlayerSkin(playerid, 266);
case 3: SetPlayerSkin(playerid, 267);
}
}

 

Jaj to jest pravda dike

 

edit// a mam tam davat to new policeskin = random(3);

???

Link to comment
Share on other sites

  • 0

 

edit// a mam tam davat to new policeskin = random(3);

???

 

wtf?!

 

takze zase blbe to delas...

 

proc to neudelas tak?

if(listitem == 1)
{
   switch(random(3))
   {

?

Link to comment
Share on other sites

  • 0

 

edit// a mam tam davat to new policeskin = random(3);

???

 

wtf?!

 

takze zase blbe to delas...

 

proc to neudelas tak?

if(listitem == 1)
{
   switch(random(3))
   {

?

 

ok dik

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...