Jump to content
  • 0

Eroare:LuckyEvent


[RSD]TheBoss

Question

Am facut un filterscript

deci nu da erori nimic...il bag in server.cfg

deschid consola si in cateva secunde cam vreo 2 se inchide imediat

uitati fs-ul:

eu l-am facut :)

#include <a_samp>
#include <Colors>
#include <0Admin_F>

#pragma tabsize 0


/////////////////Variabiles/////////////////
new luckyv[MAX_PLAYERS];
/////////////////Calback///////////////////////////

public OnPlayerConnect(playerid)
{
luckyv[playerid]=0;
}
public OnPlayerDisconnect(playerid)
{
luckyv[playerid]=0;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
 if(strcmp("/startluckevent",cmdtext,true) ==0)
 {
  if(GetPlayerLevel(playerid) >=3)
  {
	new luckyvmsg[30];
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has start the /joinlucky commands you now can see what you lucky you have ",name);
	SendClientMessageToAll(COLOR_RED,luckyvmsg);
	luckyv[playerid]=1;
  }
  else SendClientMessage(playerid,COLOR_RED,"You aren't an admin");
 return 1;
 }
  if(strcmp("/closeluckevent",cmdtext,true) ==0)
  {
  if(GetPlayerLevel(playerid) >=3)
  {
	new luckyvmsg[30];
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid,name,sizeof(name));
	format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has close the /lucky :(now only players What joined in event",name);
	SendClientMessageToAll(COLOR_RED,luckyvmsg);
	SetTimer("Winner",60000,0);
	luckyv[playerid]=0;
  }
  else SendClientMessage(playerid,COLOR_RED,"You aren't an admin");
  }
  if(strcmp("/joinlucky",cmdtext,true) ==0)
  {
  if(luckyv[playerid]=1)
  {
   new joinmsg[10];
   new name[MAX_PLAYER_NAME];
   GetPlayerName(playerid,name,sizeof(name));
   format(joinmsg,sizeof(joinmsg),"%s has joined in the event.!");
   SendClientMessageToAll(COLOR_RED,joinmsg);
  }
  else if(luckyv[playerid]=0)
  {
  SendClientMessage(playerid,COLOR_RED,"The event is not open or the join periody is close.Sorry try again later!");
  }
  return 1;
  }
return 1;
}
//////////////Public & Forward///////////////////
forward Winner();
public Winner()
{
for(new i;i <MAX_PLAYERS;i++)
{
  new tmp[256];
  new winner;
  winner=strval(tmp);
  switch(random(6) )
  {
  case 0.5:
  {
  SendClientMessage(winner,COLOR_RED,"Your lucky is very bad.!");
  }
  case 2.5:
  {
  SendClientMessage(winner,COLOR_RED,"Your lucky  is good but is not enoungh to win.!");
  }
  case 6:
  {
  GivePlayerMoney(winner,5000);
  SetPlayerScore(winner,GetPlayerScore(winner)+10);
  GivePlayerWeapon(winner,38,500);
  SendClientMessage(winner,COLOR_RED,"You reward is:money:5000,score+10,minigun:500 ammunition");
  luckyv[i]=0;
  }
  }
  }
}
////////////////////////////////////////////////

New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Vezi asa, desi tot cred ca vei primi crash:

[pawn]#include <a_samp>

#include <Colors>

#include <0Admin_F>

#pragma tabsize 0

/////////////////Variabiles/////////////////

new luckyv[MAX_PLAYERS];

/////////////////Calback///////////////////////////

public OnPlayerConnect(playerid)

{

luckyv[playerid]=0;

}

public OnPlayerDisconnect(playerid)

{

luckyv[playerid]=0;

}

public OnPlayerCommandText(playerid,cmdtext[])

{

if(strcmp("/startluckevent",cmdtext,true) ==0)

{

  if(GetPlayerLevel(playerid) >=3)

  {

new luckyvmsg[30];

new name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has start the /joinlucky commands you now can see what you lucky you have :)",name);

SendClientMessageToAll(COLOR_RED,luckyvmsg);

luckyv[playerid]=1;

  }

  else SendClientMessage(playerid,COLOR_RED,"You aren't an admin");

return 1;

}

  if(strcmp("/closeluckevent",cmdtext,true) ==0)

  {

  if(GetPlayerLevel(playerid) >=3)

  {

new luckyvmsg[30];

new name[MAX_PLAYER_NAME];

GetPlayerName(playerid,name,sizeof(name));

format(luckyvmsg,sizeof(luckyvmsg),"Administrator %s has close the /lucky :(now only players What joined in event",name);

SendClientMessageToAll(COLOR_RED,luckyvmsg);

SetTimer("Winner",60000,0);

luckyv[playerid]=0;

  }

  else SendClientMessage(playerid,COLOR_RED,"You aren't an admin");

  }

  if(strcmp("/joinlucky",cmdtext,true) ==0)

  {

  if(luckyv[playerid]==1)

  {

  new joinmsg[10];

  new name[MAX_PLAYER_NAME];

  GetPlayerName(playerid,name,sizeof(name));

  format(joinmsg,sizeof(joinmsg),"%s has joined in the event.!");

  SendClientMessageToAll(COLOR_RED,joinmsg);

  }

  else if(luckyv[playerid]==0)

  {

  SendClientMessage(playerid,COLOR_RED,"The event is not open or the join periody is close.Sorry try again later!");

  }

  return 1;

  }

return 1;

}

//////////////Public & Forward///////////////////

forward Winner();

public Winner()

{

for(new i;i <MAX_PLAYERS;i++)

{

  new tmp[256];

  new winner;

  winner=strval(tmp);

  switch(random(6) )

  {

  case 0.5:

  {

  SendClientMessage(winner,COLOR_RED,"Your lucky is very bad.!");

  }

  case 2.5:

  {

  SendClientMessage(winner,COLOR_RED,"Your lucky  is good but is not enoungh to win.!");

  }

  case 6:

  {

  GivePlayerMoney(winner,5000);

  SetPlayerScore(winner,GetPlayerScore(winner)+10);

  GivePlayerWeapon(winner,38,500);

  SendClientMessage(winner,COLOR_RED,"You reward is:money:5000,score+10,minigun:500 ammunition");

  luckyv=0;

  }

  }

  }

}

////////////////////////////////////////////////[/pawn]

Link to comment
Share on other sites

nu n-am primit crash dar am primit erori :)) chiar 18

D:\Servere\Server de SAMP\Server 0.6 samp\pawno\include\YSI\y_scripting.inc(565) : warning 219: local variable "name" shadows a variable at a preceding level
D:\Servere\Server de SAMP\Server 0.6 samp\pawno\include\YSI\y_scripting.inc(616) : warning 219: local variable "name" shadows a variable at a preceding level
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(20) : error 025: function heading differs from prototype
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(20) : error 029: invalid expression, assumed zero
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(22) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(24) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(28) : error 021: symbol already defined: "GetPlayerName"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(33) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(34) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(36) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(38) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(40) : error 021: symbol already defined: "luckyvmsg"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(41) : error 021: symbol already defined: "name"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(48) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(50) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(52) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(55) : error 021: symbol already defined: "name"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(60) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(64) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(66) : error 010: invalid function or declaration
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(99) : warning 203: symbol is never used: "__Name"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(99) : warning 203: symbol is never used: "joinmsg"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(99) : warning 203: symbol is never used: "luckyvmsg"
D:\Servere\Server de SAMP\Server 0.6 samp\filterscripts\LuckyEvent.pwn(99) : warning 203: symbol is never used: "name"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


18 Errors.

New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.