Szerző Téma: Error :(  (Megtekintve 467 alkalommal)

Error :(
« Dátum: 2013. május 16. - 16:55:35 »
0 Show voters
Üdv  Miért van ez    :shurg:     :cry3:  :tantrum:   ???
HIBA
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(547) : error 017: undefined symbol \"f_open\"
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(547) : warning 213: tag mismatch
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(549) : error 017: undefined symbol \"f_read\"
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(549) : warning 202: number of arguments does not match definition
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(570) : error 017: undefined symbol \"f_close\"
C:\\Documents and Settings\\Administrator\\Asztal\\Új mappa (2)\\filterscripts\\racescr.pwn(547) : warning 204: symbol is assigned a value that is never used: \"example\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
3 Errors.

 
A FS 
 
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <fixchars.h>
#include <filemanager>
#define red        0xFF0000AA
#define orange        0xFF9900AA
#define Format(%0,%1,%2) format(%0,sizeof(%0),%1,%2)
#define FormatTo(%0,%1) format(%0,sizeof(%0),%1)
stock StrCheck(str[],start,end)
{
for(new i=start; i < end; i++)
{
    if(str == \"\\r\\n\")strdel(str,i,i+1);
}
}
forward RaceCount();
forward RaceTimeTimer();
forward DelRace();
forward UpdateHelyezes();
new CurrentRace;
new CurrentRaceCar;
new CurrentRaceName[50];
new RaceCountTick;
new RaceTimeTimerTick;
new RaceHelyezes[MAX_PLAYERS];
new Rekorder[MAX_PLAYER_NAME];
new RekorderTime;
new RaceCPs[MAX_PLAYERS] = 0;
new PlayerInRace[MAX_PLAYERS];
new PlayerOutRace[MAX_PLAYERS];
new RaceCountdown = 20;
new PlayersInRace = 0;
new PlayersOutRace;
new MaxCPs;
new StartPlayersInRace = 0;
new RaceTimeer;
new CurrentRaceMax;
new RaceFinal = 1;
new   Float:xyzpos[3];
new WinCost[5];
new bool:RaceStarted = false;
new bool:InRace       = false;
new Float:TheRaceCP[200][3];
new Text:RaceHatter;
new Text:HelyezesSzoveg;
new PlayerText:Helyezes[MAX_PLAYERS];
new Text:IdoSzoveg;
new Text:CPSzoveg;
new PlayerText:Ido[MAX_PLAYERS];
new PlayerText:CP[MAX_PLAYERS];
public OnFilterScriptExit()
{
TextDrawDestroy(RaceHatter);
TextDrawDestroy(HelyezesSzoveg);
TextDrawDestroy(IdoSzoveg);
TextDrawDestroy(CPSzoveg);
for(new i; i<MAX_PLAYERS;i++)
{
PlayerTextDrawDestroy(i,Helyezes);
PlayerTextDrawDestroy(i,Ido);
PlayerTextDrawDestroy(i,CP);
}
return 1;
}
public OnFilterScriptInit()
{
//TXTDRW
RaceHatter = TextDrawCreate(614.000000, 281.000000, \"     \");
TextDrawBackgroundColor(RaceHatter, 255);
TextDrawFont(RaceHatter, 1);
TextDrawLetterSize(RaceHatter, 0.500000, 1.000000);
TextDrawColor(RaceHatter, -1);
TextDrawSetOutline(RaceHatter, 0);
TextDrawSetProportional(RaceHatter, 1);
TextDrawSetShadow(RaceHatter, 1);
TextDrawUseBox(RaceHatter, 1);
TextDrawBoxColor(RaceHatter, 168430180);
TextDrawTextSize(RaceHatter, 493.000000, 0.000000);
HelyezesSzoveg = TextDrawCreate(497.000000, 279.000000, \"Helyezes:\");
TextDrawBackgroundColor(HelyezesSzoveg, 255);
TextDrawFont(HelyezesSzoveg, 1);
TextDrawLetterSize(HelyezesSzoveg, 0.430000, 1.200000);
TextDrawColor(HelyezesSzoveg, -1);
TextDrawSetOutline(HelyezesSzoveg, 0);
TextDrawSetProportional(HelyezesSzoveg, 1);
TextDrawSetShadow(HelyezesSzoveg, 1);
IdoSzoveg = TextDrawCreate(497.000000, 293.000000, \"Ido:\");
TextDrawBackgroundColor(IdoSzoveg, 255);
TextDrawFont(IdoSzoveg, 1);
TextDrawLetterSize(IdoSzoveg, 0.430000, 1.200000);
TextDrawColor(IdoSzoveg, -1);
TextDrawSetOutline(IdoSzoveg, 0);
TextDrawSetProportional(IdoSzoveg, 1);
TextDrawSetShadow(IdoSzoveg, 1);
CPSzoveg = TextDrawCreate(497.000000, 307.000000, \"CP:\");
TextDrawBackgroundColor(CPSzoveg, 255);
TextDrawFont(CPSzoveg, 1);
TextDrawLetterSize(CPSzoveg, 0.430000, 1.200000);
TextDrawColor(CPSzoveg, -1);
TextDrawSetOutline(CPSzoveg, 0);
TextDrawSetProportional(CPSzoveg, 1);
TextDrawSetShadow(CPSzoveg, 1);
for(new playerid; playerid < MAX_PLAYERS; playerid++)
{
Helyezes[playerid] = CreatePlayerTextDraw(playerid,564.000000, 279.000000, \"100\");
PlayerTextDrawBackgroundColor(playerid,Helyezes[playerid], 255);
PlayerTextDrawFont(playerid,Helyezes[playerid], 1);
PlayerTextDrawLetterSize(playerid,Helyezes[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,Helyezes[playerid], -7012097);
PlayerTextDrawSetOutline(playerid,Helyezes[playerid], 0);
PlayerTextDrawSetProportional(playerid,Helyezes[playerid], 1);
PlayerTextDrawSetShadow(playerid,Helyezes[playerid], 1);
Ido[playerid] = CreatePlayerTextDraw(playerid,575.000000, 293.000000, \"10:59\");
PlayerTextDrawAlignment(playerid,Ido[playerid], 3);
PlayerTextDrawBackgroundColor(playerid,Ido[playerid], 255);
PlayerTextDrawFont(playerid,Ido[playerid], 1);
PlayerTextDrawLetterSize(playerid,Ido[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,Ido[playerid], -7012097);
PlayerTextDrawSetOutline(playerid,Ido[playerid], 0);
PlayerTextDrawSetProportional(playerid,Ido[playerid], 1);
PlayerTextDrawSetShadow(playerid,Ido[playerid], 1);
CP[playerid] = CreatePlayerTextDraw(playerid,570.000000, 307.000000, \"100/10\");
PlayerTextDrawAlignment(playerid,CP[playerid], 3);
PlayerTextDrawBackgroundColor(playerid,CP[playerid], 255);
PlayerTextDrawFont(playerid,CP[playerid], 1);
PlayerTextDrawLetterSize(playerid,CP[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,CP[playerid], -7012097);
PlayerTextDrawSetOutline(playerid,CP[playerid], 0);
PlayerTextDrawSetProportional(playerid,CP[playerid], 1);
PlayerTextDrawSetShadow(playerid,CP[playerid], 1);
}
return 1;
}
public UpdateHelyezes()
{
if(!RaceStarted)return 0;
PlayersInRace = 0;
for(new i; i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && PlayerOutRace == 1)PlayersInRace++;
if(IsPlayerConnected(i) && PlayerInRace == 1)PlayerTextDrawSetString(i,Ido,TimeConvert(RaceTimeer));
}
for(new i; i<MAX_PLAYERS;i++)
{
    if(IsPlayerConnected(i) && PlayerInRace == 1)
    {
    if(PlayersInRace == 1)
   {
      RaceHelyezes = 1;
      PlayerTextDrawSetString(i,Helyezes, Valstr(RaceHelyezes));
       break;
    }
   RaceHelyezes=PlayersInRace;
    for(new z; z < MAX_PLAYERS; z++)
   {
       if(IsPlayerConnected(z) && PlayerOutRace[z] == 1 && i != z)
       {
          if(RaceCPs > RaceCPs[z])RaceHelyezes--;
          else if(RaceCPs == RaceCPs[z])
          {
              new Float:pcps[2];
            pcps[0] = GetPlayerDistanceFromPoint(i,TheRaceCP[RaceCPs+1][0],TheRaceCP[RaceCPs+1][1],TheRaceCP[RaceCPs+1][2]);
            pcps[1] = GetPlayerDistanceFromPoint(z,TheRaceCP[RaceCPs[z]+1][0],TheRaceCP[RaceCPs[z]+1][1],TheRaceCP[RaceCPs[z]+1][2]);
            if(pcps[0] < pcps[1])RaceHelyezes--;
         }
      }
   }
   if(RaceHelyezes == 0)RaceHelyezes = PlayersInRace;
   PlayerTextDrawSetString(i,Helyezes, Valstr(RaceHelyezes));
}
}
return 1;
}
stock HelyezesConvert(asd)
{
new string[100];
format(string,100,\"%d/%d\",asd,PlayersInRace);
return string;
}
stock Valstr(val)
{
new string[100];
valstr(string,val);
return string;
}
public DelRace()
{
InRace             = false;
RaceStarted       = false;
RaceCountdown       = 20;
PlayersOutRace       = 0;
PlayersInRace       = 0;
RaceFinal          = 1;
RaceTimeer          = 0;
KillTimer(RaceTimeTimerTick);
KillTimer(RaceCountTick);
for(new i = 0;i < MAX_PLAYERS;i++)
{
    PlayerOutRace = 0;
    if(PlayerInRace == 1)
    {
   PlayerInRace = 0;
   RaceCPs      = 0;
   SendClientMessage(i,red,\"Vége a versenynek\");
   DisablePlayerRaceCheckpoint(i);
    }
}
return 1;
}
public RaceCount()
{
if(RaceCountdown >= 1 && RaceStarted == false)
{
      RaceCountdown--;
}
if(RaceCountdown == 0)
    {
RaceStarted = true;
StartPlayersInRace = GetPlayersInRace();
KillTimer(RaceCountTick);
RaceTimeTimerTick = SetTimer(\"RaceTimeTimer\", 1000, 1);
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(PlayerInRace == 1 && InRace == true)
    {
        if(RaceCountdown >= 1)
        {
        new str[200];
        format(str,sizeof(str),\"Start: %d\",RaceCountdown);
        GameTextForPlayer(i,str,1000,3);
        if(RaceCountdown == 5) TogglePlayerControllable(i,0);
   }
        if(RaceCountdown == 0)
        {
        new str[200];
        format(str,sizeof(str),\"!!GO!GO!GO!!\",RaceCountdown);
      PlayersOutRace++;
        GameTextForPlayer(i,str,3000,3);
        TogglePlayerControllable(i,1);
        if(IsPlayerInRaceCheckpoint(i))
        {
            OnPlayerEnterRaceCheckpoint(i);
        }
   }
}
}
}
public RaceTimeTimer()
{
if(RaceTimeer <= CurrentRaceMax-1 && RaceStarted == true)
{
      RaceTimeer++;
UpdateHelyezes();
}
    if(RaceTimeer == CurrentRaceMax)
    {
DelRace();
KillTimer(RaceTimeTimerTick);
}
}
stock CPConvert(asd)
{
new string[100];
format(string,100,\"%d/%d\",asd,MaxCPs);
return string;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(RaceStarted == true)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) != CurrentRaceCar)return 0;
        PlayerTextDrawSetString(playerid,CP[playerid],CPConvert(RaceCPs[playerid]+1));
       if(RaceCPs[playerid] < MaxCPs-2)
{
    DisablePlayerRaceCheckpoint(playerid);
   RaceCPs[playerid]++;
   SetPlayerRaceCheckpoint(playerid, 0, TheRaceCP[RaceCPs[playerid]][0], TheRaceCP[RaceCPs[playerid]][1], TheRaceCP[RaceCPs[playerid]][2], TheRaceCP[RaceCPs[playerid]+1][0], TheRaceCP[RaceCPs[playerid]+1][1], TheRaceCP[RaceCPs[playerid]+1][2], 16.0);
}
else if(RaceCPs[playerid] == MaxCPs-2)
{
    DisablePlayerRaceCheckpoint(playerid);
   RaceCPs[playerid]++;
   SetPlayerRaceCheckpoint(playerid, 1, TheRaceCP[RaceCPs[playerid]][0], TheRaceCP[RaceCPs[playerid]][1], TheRaceCP[RaceCPs[playerid]][2], 0.0, 0.0, 0.0, 16.0);
}
    else if(RaceCPs[playerid] == MaxCPs-1)
{
    DisablePlayerRaceCheckpoint(playerid);
    WinCost[0] = 6600 * StartPlayersInRace;
   WinCost[1] = 5600 * StartPlayersInRace;
   WinCost[2] = 4600 * StartPlayersInRace;
   WinCost[3] = 2900 * StartPlayersInRace;
   WinCost[4] = 1900 * StartPlayersInRace;
    new str[200],WinX;
    switch(RaceFinal)
    {
        case 1:
        {
         GivePlayerMoney(playerid,WinCost[0]);
         WinX = WinCost[0];
        }
        case 2:
        {
         GivePlayerMoney(playerid,WinCost[0]);
         WinX = WinCost[1];
        }
        case 3:
        {
         GivePlayerMoney(playerid,WinCost[0]);
         WinX = WinCost[2];
        }
        case 4:
        {
         GivePlayerMoney(playerid,WinCost[0]);
         WinX = WinCost[3];
        }
        case 5:
        {
         GivePlayerMoney(playerid,WinCost[0]);
         WinX = WinCost[4];
        }
        default:
        {
         WinX = 0;
        }
    }
   if(PlayersOutRace == 1)WinX = 0;
   Format(str, \"%s beért a célba | Idõ: %s | helyezés: %d/%d | nyeremény: %d$\",pName(playerid),TimeConvert(RaceTimeer),RaceFinal,PlayersOutRace,WinX);
   SendClientMessageToAll(orange,str);
   if(RaceTimeer < RekorderTime)
   {
       WinX = WinCost[0];
       RekorderTime = RaceTimeer;
      FormatTo(Rekorder,pName(playerid));
       SaveRace(CurrentRace);
                Format(str, \"%s rekord idõt ment a \\\"%s\\\" versenyen | Idõ: %s | Jutalom: %d$\",pName(playerid),CurrentRaceName,TimeConvert(RaceTimeer),floatround(WinX*0.40));
      SendClientMessageToAll(orange,str);
   }
   RaceCPs[playerid] = 0;
   RaceFinal++;
   PlayerInRace[playerid] = false;
   SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),0);
   SetPlayerVirtualWorld(playerid,0);
   if(GetPlayersInRace() == 0)DelRace();
   TextDrawHideForPlayer(playerid, HelyezesSzoveg);
   TextDrawHideForPlayer(playerid, IdoSzoveg);
   TextDrawHideForPlayer(playerid, CPSzoveg);
   TextDrawHideForPlayer(playerid, RaceHatter);
   PlayerTextDrawHide(playerid, Helyezes[playerid]);
   PlayerTextDrawHide(playerid, Ido[playerid]);
   PlayerTextDrawHide(playerid, CP[playerid]);
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1991)
{
if(response)
{
    if(RaceStarted == false && InRace == false)
    {
      CurrentRace = listitem;
      StartRace(CurrentRace);
       PlayerInRace[playerid] = 1;
       PlayerOutRace[playerid] = 1;
      RaceCPs[playerid] = 0;
      SetPlayerRaceCheckpoint(playerid, 0, TheRaceCP[RaceCPs[playerid]][0], TheRaceCP[RaceCPs[playerid]][1], TheRaceCP[RaceCPs[playerid]][2], TheRaceCP[RaceCPs[playerid]+1][0], TheRaceCP[RaceCPs[playerid]+1][1], TheRaceCP[RaceCPs[playerid]+1][2], 16.0);
      InRace = true;
      SetPlayerPos(playerid,xyzpos[0],xyzpos[1],xyzpos[2]);
      RaceCountTick = SetTimer(\"RaceCount\", 1000, 1);
      SetPlayerVirtualWorld(playerid,1221);
      TextDrawShowForPlayer(playerid, HelyezesSzoveg);
      TextDrawShowForPlayer(playerid, IdoSzoveg);
      TextDrawShowForPlayer(playerid, CPSzoveg);
      TextDrawShowForPlayer(playerid, RaceHatter);
      PlayerTextDrawShow(playerid, Helyezes[playerid]);
      PlayerTextDrawShow(playerid, Ido[playerid]);
      PlayerTextDrawShow(playerid, CP[playerid]);
      format(CurrentRaceName,50,inputtext);
   }
   else return SendClientMessage(playerid,red,\"A verseny már elkezdõdött!\");
}
}
return 1;
}
CMD:races(playerid)
{
if(InRace == false)
{
new allraces[] = \"Infernus speed one\\nDrag\\nLos Santos Race\\nSan Fierro Race\\nGray Asphalt\\nTruck Race\\nBig Race\\nCanal Washing\";
ShowPlayerDialog(playerid, 1991, DIALOG_STYLE_LIST, \"Versenyek\", allraces, \"Kiválaszt\", \"Kilép\");
}
else return SendClientMessage(playerid,red,\"Már megy egy verseny!\");
return 1;
}
CMD:race(playerid)
{
if(InRace == true && RaceStarted == false)
{
if(PlayerInRace[playerid] == 0)
{
   SetPlayerVirtualWorld(playerid, 1221);
   SetPlayerRaceCheckpoint(playerid, 0, TheRaceCP[RaceCPs[playerid]][0], TheRaceCP[RaceCPs[playerid]][1], TheRaceCP[RaceCPs[playerid]][2], TheRaceCP[RaceCPs[playerid]+1][0], TheRaceCP[RaceCPs[playerid]+1][1], TheRaceCP[RaceCPs[playerid]+1][2], 16.0);
            SetPlayerPos(playerid,xyzpos[0],xyzpos[1],xyzpos[2]);
   RaceCPs[playerid] = 0;
   PlayerInRace[playerid] = 1;
   PlayerOutRace[playerid] = 1;
   new str[200];
   format(str,sizeof(str),\"Csatlakoztál a(z) %s versenyhez.\",CurrentRaceName);
   SendClientMessage(playerid,orange,str);
   TextDrawShowForPlayer(playerid, HelyezesSzoveg);
   TextDrawShowForPlayer(playerid, IdoSzoveg);
   TextDrawShowForPlayer(playerid, CPSzoveg);
   TextDrawShowForPlayer(playerid, RaceHatter);
   PlayerTextDrawShow(playerid, Helyezes[playerid]);
   PlayerTextDrawShow(playerid, Ido[playerid]);
   PlayerTextDrawShow(playerid, CP[playerid]);
}
else return SendClientMessage(playerid,red,\"Te már versenyben vagy!\");
}
else return SendClientMessage(playerid,red,\"Jelenleg nincs verseny vagy már elkezdõdött\");
return 1;
}
 
public OnPlayerConnect(playerid)
{
Helyezes[playerid] = CreatePlayerTextDraw(playerid,564.000000, 279.000000, \"100\");
PlayerTextDrawBackgroundColor(playerid,Helyezes[playerid], 255);
PlayerTextDrawFont(playerid,Helyezes[playerid], 1);
PlayerTextDrawLetterSize(playerid,Helyezes[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,Helyezes[playerid], -1);
PlayerTextDrawSetOutline(playerid,Helyezes[playerid], 0);
PlayerTextDrawSetProportional(playerid,Helyezes[playerid], 1);
PlayerTextDrawSetShadow(playerid,Helyezes[playerid], 1);
Ido[playerid] = CreatePlayerTextDraw(playerid,575.000000, 293.000000, \"10:59\");
PlayerTextDrawAlignment(playerid,Ido[playerid], 3);
PlayerTextDrawBackgroundColor(playerid,Ido[playerid], 255);
PlayerTextDrawFont(playerid,Ido[playerid], 1);
PlayerTextDrawLetterSize(playerid,Ido[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,Ido[playerid], -1);
PlayerTextDrawSetOutline(playerid,Ido[playerid], 0);
PlayerTextDrawSetProportional(playerid,Ido[playerid], 1);
PlayerTextDrawSetShadow(playerid,Ido[playerid], 1);
CP[playerid] = CreatePlayerTextDraw(playerid,570.000000, 307.000000, \"100/10\");
PlayerTextDrawAlignment(playerid,CP[playerid], 3);
PlayerTextDrawBackgroundColor(playerid,CP[playerid], 255);
PlayerTextDrawFont(playerid,CP[playerid], 1);
PlayerTextDrawLetterSize(playerid,CP[playerid], 0.430000, 1.200000);
PlayerTextDrawColor(playerid,CP[playerid], -1);
PlayerTextDrawSetOutline(playerid,CP[playerid], 0);
PlayerTextDrawSetProportional(playerid,CP[playerid], 1);
PlayerTextDrawSetShadow(playerid,CP[playerid], 1);
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
if(PlayerInRace[playerid]==1)cmd_exitrace(playerid);
return 1;
}
public OnPlayerDeath(playerid,killerid,reason)
{
if(PlayerInRace[playerid]==1)cmd_exitrace(playerid);
return 1;
}
CMD:exitrace(playerid)
{
if(PlayerInRace[playerid] == 1 && InRace == true)
{
PlayerInRace[playerid] = 0;
SendClientMessage(playerid,red,\"Kiestél a versenybõl\");
DisablePlayerRaceCheckpoint(playerid);
if(GetPlayersInRace() == 0)return DelRace();
TextDrawHideForPlayer(playerid, HelyezesSzoveg);
TextDrawHideForPlayer(playerid, IdoSzoveg);
TextDrawHideForPlayer(playerid, CPSzoveg);
TextDrawHideForPlayer(playerid, RaceHatter);
PlayerTextDrawHide(playerid, Helyezes[playerid]);
PlayerTextDrawHide(playerid, Ido[playerid]);
PlayerTextDrawHide(playerid, CP[playerid]);
}
else return SendClientMessage(playerid,red,\"Nem vagy versenyben!\");
return 1;
}
stock TimeConvert(time)
{
    new minutes;
    new seconds;
    new string[128];
    if(time > 59)
{
        minutes = floatround(time/60);
        seconds = floatround(time - minutes*60);
        if(seconds>9)format(string,sizeof(string),\"%d:%d\",minutes,seconds);
        else format(string,sizeof(string),\"%d:0%d\",minutes,seconds);
    }
    else
{
        seconds = floatround(time);
        if(seconds>9)format(string,sizeof(string),\"0:%d\",seconds);
        else format(string,sizeof(string),\"0:0%d\",seconds);
    }
    return string;
}
stock StartRace(raceid)
{
    new string[200], string2[200];
    format(string,sizeof(string),\"scriptfiles/race%d.ini\",raceid);
    if(!file_exists(string))return 0;
    new File:example = f_open(string);
    new count = 0;
    while(f_read(example, string, sizeof(string)))
    {
if(count == 0)format(string2,sizeof(string2),\"Elindult a(z) \\\"%s\\\" verseny, csatlakozni a /race paranccsal lehet.\",string);
else if(count == 1)MaxCPs = strval(string);
else if(count == 2)CurrentRaceMax = strval(string);
else if(count == 3)CurrentRaceCar = strval(string);
else if(count == 4)FormatTo(Rekorder,string);
else if(count == 5)RekorderTime = strval(string);
else if(count == 6)
{
    sscanf(string,\"p<,>fff\",xyzpos[0],xyzpos[1],xyzpos[2]);
}
else if(count > 6)
{
    sscanf(string,\"p<,>fff\",TheRaceCP[count-7][0],TheRaceCP[count-7][1],TheRaceCP[count-7][2]);
}
count++;
    }
SendClientMessageToAll(orange,string);
format(string,sizeof(string),\"CheckPointok: %d, Jármû: /v %d, Versenyidõ: %s, Rekorder: %s, Rekordidõ: %s\",MaxCPs,CurrentRaceCar,TimeConvert(CurrentRaceMax),Rekorder,TimeConvert(RekorderTime));
SendClientMessageToAll(orange,string);
f_close(example);
    return 1;
}
stock GetPlayersInRace()
{
new count;
for(new i; i<MAX_PLAYERS;i++)if(IsPlayerConnected(i) && PlayerInRace == 1) count++;
return count;
}
stock SaveRace(raceid)
{
    new string[2000],example[100];
    format(example,sizeof(example),\"scriptfiles/race%d.ini\",raceid);
    if(!file_exists(example))return file_create(example);
    file_delete(example);
//    new File:example = fopen(string, io_write);
format(string,sizeof(string),\"%s\\r\\n\",CurrentRaceName);
file_write(example,string);
format(string,sizeof(string),\"%d\\r\\n\",MaxCPs);
file_write(example,string);
format(string,sizeof(string),\"%d\\r\\n\",CurrentRaceMax);
file_write(example,string);
format(string,sizeof(string),\"%d\\r\\n\",CurrentRaceCar);
file_write(example,string);
format(string,sizeof(string),\"%s\\r\\n\",Rekorder);
file_write(example,string);
format(string,sizeof(string),\"%d\\r\\n\",RekorderTime);
file_write(example,string);
format(string,sizeof(string),\"%f,%f,%f\\r\\n\",xyzpos[0],xyzpos[1],xyzpos[2]);
file_write(example,string);
for(new i; i < MaxCPs; i++)
{
if(i == MaxCPs-1)
{
         format(string,sizeof(string),\"%f,%f,%f\",TheRaceCP[0],TheRaceCP[1],TheRaceCP[2]);
   file_write(example,string);
   break;
}
format(string,sizeof(string),\"%f,%f,%f\\r\\n\",TheRaceCP[0],TheRaceCP[1],TheRaceCP[2]);
file_write(example,string);
}
//   fclose(example);
return 1;
}
stock pName(playerid)
{
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid,plname,MAX_PLAYER_NAME);
return plname;
}

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Error :(
« Válasz #1 Dátum: 2013. május 16. - 19:10:17 »
0 Show voters
[mod]Ott van fent az \'Itt kérdezz errort!\' téma. Ott kérdezz.[/mod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal