case 4:
{
new string[64];
format(string,64,"%s\nChienThang!",GetRacerName(RaceWinner));
Update3DTextLabelText(CowNames[RaceWinner],COLOR_WINNER,string);
Update3DTextLabelText(RaceStart,COLOR_WINNER,string);
OnRaceEnd();//line warning
RaceStep=5;
SetTimer("OnRaceUpdate",5000,0);
}
public OnRaceEnd()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new string[64];
new pvar[5];
format(pvar,5,"BET%d",RaceWinner);
SetPVarInt(playerid,pvar,GetPVarInt(playerid,pvar)*2);
if(GetPVarInt(playerid,pvar))
{
format(string,64,"Ban thang $%d khi dat cuoc %s!",GetPVarInt(playerid,pvar),GetRacerName(RaceWinner));
SendClientMessage(playerid,COLOR_WINNER,string);
PlayerInfo[playerid][pCash] += GetPVarInt(playerid,pvar);
}
for(new bet;bet<5;bet++)
{
format(pvar,5,"BET%d",bet);
SetPVarInt(playerid,pvar,0);
}
}
return 1;
}
#define Dialog_Duabo 4789
#define MAX_PACES 20
#define MIN_SPEED 1
#define MAX_SPEED 5
#define RIG_SPEED 2 //This add or subtracts the randomizer when using the Rigging features (Steroids and Sleeping Pills)
#define RIG_PIT_STOP_TIME 2000 //This time in milliseconds a cow will wait if affected by Pit Stop
#define RACE_INTERVAL 30000 //Milliseconds in between races
#define COLOR_COW_1 0xCC0000FF
#define COLOR_COW_2 0xFFAAAAFF
#define COLOR_COW_3 0xFFFF00FF
#define COLOR_COW_4 0x4444FFFF
#define COLOR_COW_5 0xCCCC00FF
#define COLOR_INTERMISSION 0x888888FF
#define COLOR_RACE_BEGINNING 0xFF1111FF
#define COLOR_ON_YOUR_MARK 0xDD0000FF
#define COLOR_GET_SET 0xDD8800FF
#define COLOR_GO_GO_GO 0x00DD00FF
#define COLOR_WINNER 0x00FF00FF
#define COLOR_WINDOW_CLOSE 0xFF0000FF
/////////////////////////////////////////
OnRaceEnd()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new string[64];
new pvar[5];
format(pvar,5,"BET%d",RaceWinner);
SetPVarInt(playerid,pvar,GetPVarInt(playerid,pvar)*2);
if(GetPVarInt(playerid,pvar))
{
format(string,64,"Ban thang $%d khi dat cuoc %s!",GetPVarInt(playerid,pvar),GetRacerName(RaceWinner));
SendClientMessage(playerid,COLOR_WINNER,string);
PlayerInfo[playerid][pCash] += GetPVarInt(playerid,pvar);
}
for(new bet;bet<5;bet++)
{
format(pvar,5,"BET%d",bet);
SetPVarInt(playerid,pvar,0);
}
}
return 1;
}
try to use
PHP код:
|
forward OnRaceEnd();
public OnRaceEnd()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new string[64];
new pvar[5];
format(pvar,5,"BET%d",RaceWinner);
SetPVarInt(playerid,pvar,GetPVarInt(playerid,pvar)*2);
if(GetPVarInt(playerid,pvar))
{
format(string,64,"You won $%d for betting on %s!",GetPVarInt(playerid,pvar),GetRacerName(RaceWinner));
SendClientMessage(playerid,COLOR_WINNER,string);
GivePlayerMoney(playerid,GetPVarInt(playerid,pvar));
}
for(new bet;bet<5;bet++)
{
format(pvar,5,"BET%d",bet);
SetPVarInt(playerid,pvar,0);
}
}
return 1;
}
OnRaceEnd()
{
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(!IsPlayerConnected(playerid))continue;
new string[64];
new pvar[5];
format(pvar,5,"BET%d",RaceWinner);
SetPVarInt(playerid,pvar,GetPVarInt(playerid,pvar)*2);
if(GetPVarInt(playerid,pvar))
{
format(string,64,"Ban thang $%d khi dat cuoc %s!",GetPVarInt(playerid,pvar),GetRacerName(RaceWinner));
SendClientMessage(playerid,COLOR_WINNER,string);
PlayerInfo[playerid][pCash] += GetPVarInt(playerid,pvar);
}
for(new bet;bet<5;bet++)
{
format(pvar,5,"BET%d",bet);
SetPVarInt(playerid,pvar,0);
}
}
return 1;
}
C:\Documents and Settings\Admin\Desktop\VnMgo.1.6\gamemodes\vnit.pw n(146551) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. |
forward OnRaceUpdate();
public OnRaceUpdate()
{
switch(RaceStep)
{
case 0: //Race is going to begin in 5 seconds
{
Update3DTextLabelText(RaceStart,COLOR_RACE_BEGINNING,"Cuoc dua duoc bat dau tro lai.");
RaceStep=1;
SetTimer("OnRaceUpdate",5000,0);
for(new playerid;playerid<MAX_PLAYERS;playerid++)
{
if(!IsPlayerConnected(playerid))continue;
if(GetPVarInt(playerid,"DIALOG"))
{
ShowPlayerDialog(playerid,-1,-1,"","","","");
SendClientMessage(playerid,COLOR_WINDOW_CLOSE,"Cuoc dua da~ bat dau` va` duoc dat cuoc da ket thuc!");
SetPVarInt(playerid,"DIALOG",0);
}
}
}
case 1:
{
Update3DTextLabelText(RaceStart,COLOR_ON_YOUR_MARK,"On Your Mark!");
RaceStep=2;
SetTimer("OnRaceUpdate",1000,0);
}
case 2:
{
Update3DTextLabelText(RaceStart,COLOR_GET_SET,"Get Set!");
RaceStep=3;
SetTimer("OnRaceUpdate",1000,0);
}
case 3:
{
Update3DTextLabelText(RaceStart,COLOR_GO_GO_GO,"Go Go Go!");
RaceStep=4;
BeginCowRace();
}
case 4:
{
new string[64];
format(string,64,"%s\nChienThang!",GetRacerName(RaceWinner));
Update3DTextLabelText(CowNames[RaceWinner],COLOR_WINNER,string);
Update3DTextLabelText(RaceStart,COLOR_WINNER,string);
OnRaceEnd();//line 146551 here,
RaceStep=5;
SetTimer("OnRaceUpdate",5000,0);
}
case 5:
{
ResetCowRace();
Update3DTextLabelText(CowNames[RaceWinner],GetRacerColor(RaceWinner),GetRacerName(RaceWinner));
Update3DTextLabelText(RaceStart,COLOR_INTERMISSION,"Intermission");
RaceStep=0;
SetTimer("OnRaceUpdate",RACE_INTERVAL,0);
}
}
}