Jump to content
  • 0

pomoc (help) menší srandička :)


Cz_Ritch

Dotaz

No takže čau.. jen mě tak napadlo kazdy chce admin lvl .... a tak dobře .. jako ze dá /lvl 5 a on chcípne.. ale jeste bych jako chtel... aby dal /lvl 5 zapnul by se timer tak na 3 s a za 3 s by ho to odvarpovalo kam já chci a tak jsem si aspon tak připravil něco.. :

 

 

if (strcmp(cmdtext, "/lvl 5", true)==0) {
SetPlayerHealth(playerid, 1);
SetPlayerPos(playerid, 1678.2666,1446.6890,54.9293);
SendClientMessage(playerid, 0xA52A2AAA, "!Sbohem!- A zadny admin lvl 5 nedostanes.. !");
Set/get(nevim...)PlayerTime(playerid, 3s)

(warp (SetPlayerPos(playerid,248.8657,1799.6632,7.4141);)-)

a dalsi timer na 10 sekund a po timeru mu to da kill.. a je volny..

 

- ale zas je to strasne porouclivi to co mate delat ale budu rat kdys mi někdo věnuje krapet času...

teda jako ... (neumi : Timer.. a po timeru třeba warp nebo kill.. jestli to de.. :d.. díik moc předem..

Link to comment
Share on other sites

Recommended Posts

  • 0

jj i to my moc pomůže.. díky.. :)

 

-- sob 09. říj 2010 12:36:10 --

 

ja to dělam do FS a on je tam modelinit a public mesage.. :(

 

-- sob 09. říj 2010 12:40:08 --

 

Předpokladam ze http://wiki.sa-mp.com/wiki/SetTimerEx je akoby timer a za timerem teleport ale kam mam dat souřadnice ? :d

Link to comment
Share on other sites

  • 0

aha.. no ja nevěděl ze to takhle de :d... jeste neumim vsechno.. delam pawno jen 2 měsíce ale ... registrovanej jsem tu dlouho.. (jednou sem zacal , pak přestal a ted zas zacal)

 

-- sob 09. říj 2010 12:50:24 --

 

hele tak jsem to nějak poskladal...

 

if (strcmp(cmdtext, "/lvl 5", true)==0) {
SetPlayerHealth(playerid, 1);
SetPlayerPos(playerid, 1678.2666,1446.6890,54.9293);
SendClientMessage(playerid, 0xA52A2AAA, "!Sbohem!- A zadny admin lvl 5 nedostanes.. !");
///////
print("Starting timer...");
SetTimer("message",3000,false);
SetPlayerPos(playerid, 248.8657,1799.6632,7.4141);

   print("Starting timer...");
   timer1 = SetTimer("message", 10000, true);

return 1;
}

 

 

public message()
{
   if(some_condition)
   {
       KillTimer(timer10);
   }
   else
   {
       print("1 second has passed");
   }
}

 

 

errors+warning..

 

C:\Documents and Settings\***\Plocha\PWn+amx\move.pwn(58) : warning 235: public function lacks forward declaration (symbol "message")

C:\Documents and Settings\***\Plocha\PWn+amx\move.pwn(60) : error 017: undefined symbol "some_condition"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

řádek 60:

   if(some_condition)

a 58

public message()

 

dík :d

 

-- sob 09. říj 2010 12:52:18 --

 

_____

tato srandička mi zabere hodně času :d

Link to comment
Share on other sites

  • 0

#include 
#pragma tabsize 0
new timer1;

public OnFilterScriptInit( )
{
print( "\n[FS] *************************" );
print( "[FS] * My SA:MP Filterscript *" );
print( "[FS] * Loaded ...            *" );
print( "[FS] *************************\n" );
}

public OnFilterScriptExit( )
{
print( "\n[FS] *************************" );
print( "[FS] * My SA:MP Filterscript *" );
print( "[FS] * Unloaded ...          *" );
print( "[FS] *************************\n" );
}

public OnPlayerCommandText( playerid, cmdtext[] )
{


if (strcmp(cmdtext, "/lvl 5", true)==0) {
SetPlayerHealth(playerid, 1);
SetPlayerPos(playerid, 1678.2666,1446.6890,54.9293);
SendClientMessage(playerid, 0xA52A2AAA, "!Sbohem!- A zadny admin lvl 5 nedostanes.. !");
///////
print("Starting timer...");
SetTimer("message",3000,false);
SetPlayerPos(playerid, 248.8657,1799.6632,7.4141);

   print("Starting timer...");
   timer1 = SetTimer("message", 10000, true);

return 1;
}



return 0;
}
////////////////////////

public message()
{
   if(some_condition)
   {
       KillTimer(timer1);
   }
   else
   {
       print("1 second has passed");
   }
}

Link to comment
Share on other sites

  • 0
#include 
#pragma tabsize 0
new timer1;

public OnFilterScriptInit( )
{
  print( "\n[FS] *************************" );
  print( "[FS] * My SA:MP Filterscript *" );
  print( "[FS] * Loaded ...            *" );
  print( "[FS] *************************\n" );
}

public OnFilterScriptExit( )
{
  print( "\n[FS] *************************" );
  print( "[FS] * My SA:MP Filterscript *" );
  print( "[FS] * Unloaded ...          *" );
  print( "[FS] *************************\n" );
}

public OnPlayerCommandText( playerid, cmdtext[] )
{

i

if (strcmp(cmdtext, "/lvl 5", true)==0) {
SetPlayerHealth(playerid, 1);
SetPlayerPos(playerid, 1678.2666,1446.6890,54.9293);
SendClientMessage(playerid, 0xA52A2AAA, "!Sbohem!- A zadny admin lvl 5 nedostanes.. !");
SetTimer("message",3000,false);
SetPlayerPos(playerid, 248.8657,1799.6632,7.4141);
   timer1 = SetTimer("message", 10000, true);

return 1;
}



  return 0;
}
////////////////////////

public message()
{
   if(some_condition)
   {
       KillTimer(timer1);
   }
   else
   {
       print("1 second has passed");
   }
}

Link to comment
Share on other sites

  • 0

C:\Documents and Settings\Martínek\Plocha\PWn+amx\Untitled10.pwn(43) : warning 235: public function lacks forward declaration (symbol "message")

C:\Documents and Settings\Martínek\Plocha\PWn+amx\Untitled10.pwn(45) : error 017: undefined symbol "some_condition"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

Link to comment
Share on other sites

  • 0

C:\Documents and Settings\Martínek\Plocha\PWn+amx\move.pwn(59) : error 017: undefined symbol "some_condition"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

1 Error.

 

 

dej mi příklad na podmínku pls

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...