Üzenetek megjelenítése

Ez a szekció lehetővé teszi a felhasználó által írt összes hozzászólás megtekintését. Vedd figyelembe, hogy csak azokba a fórumokba írt hozzászólásokat látod, amelyekhez hozzáférésed van.


Üzenetek - JBauer

Oldalak: 1 ... 84 85 [86] 87 88 ... 92
1276
Segítségkérés / Modhiba! Mi a hiba jelentése?:
« Dátum: 2012. május 06. - 14:01:26 »
Vagy több pawnod van és az egyikben (vagy többen) nincsen bent az include. Töröld ki õket, vagy rakd be mindbe.

1277
Segítségkérés / Warningok a scriptemben
« Dátum: 2012. május 06. - 14:00:32 »
Töltsd le újra az incet akkor szerintem. (Ettõl még elindul a mod)

1278
Segítségkérés / Újabb modhiba! Segítsetek kérlek!
« Dátum: 2012. május 06. - 13:59:49 »
Definiálva van, de soha nem használtad. Ha nem kell töröld ki, vagy használd fel valahol.

1279
Segítségkérés / Warningok a scriptemben
« Dátum: 2012. május 06. - 13:07:08 »
Ez nem a modban van, hanem az includeban.

1280
Általános / Szerepjátékosoknak útmutató: Mi a sikeres karakter alapja?
« Dátum: 2012. május 06. - 10:13:55 »
Az igen, kemény ott az RP...
(Én banda leaderbõl lettem rendõr  ???)

1281
Bemutatkozás / #Nexus#
« Dátum: 2012. május 06. - 10:10:23 »
Üdv itt! Ja és Thrid Lifeon játszottam. Bruno P Cortez, ha ismerõs.

1282
Archívum / SA-MP Fórum - Nyári Projectek
« Dátum: 2012. május 06. - 09:47:15 »
0.3d kliens by sa-mp.hu?  :whistle:  :thumbsup:

1283
Segítségkérés / Szerver védelem
« Dátum: 2012. május 05. - 23:01:59 »
Az

1284
Segítségkérés / Szerver védelem
« Dátum: 2012. május 05. - 22:54:14 »
4600

1285
Törölt RP Szerverek / Sky-RPG
« Dátum: 2012. május 05. - 22:26:04 »
Lopott See mod. Szerintem zárható is.
(Voltam fent, láttam.)

1286
SA-MP: Szerverfejlesztés / IG event készítõ by.: Mr. Gagi
« Dátum: 2012. május 05. - 22:04:55 »
Sziasztok. Most találtam a www.sa-mp.com -on ezt a filterscriptet, mely igazából egy esemény(event) készítõ. Letöltöttem majd lemagyarosítottam. Remélem tetszeni fog!
Eredeti link:http://forum.sa-mp.com/showthread.php?t=333398
Magyar pwn: http://data.hu/get/5079267/Gagis_D_E_S.pwn
Magyar amx: http://data.hu/get/5079269/Gagis_D_E_S.amx
Scriptflies: http://data.hu/get/5079268/scriptfiles.7z
Pastebin: http://pastebin.com/xfS3LsJA
Parancsok: /createevent - Event készítés kezdése
/finishcevent - Event készítés befejezése
/finishdmevent - DM event befejezése
/join - Eventhez csatlakozás
/startevent - Event indítás.
 
#include <a_samp>
#include <sscanf2>
#include <YSI/y_ini>
#include <YSI\\y_commands>
#include <streamer>
#include <foreach>
#pragma tabsize 0
#define SCM    SendClientMessage
#define COLOR_RED     0xD62F4E
#define COL_LIGHTBLUE \"{1BD3E0}\"
#define COL_RED      \"{D62F4E}\"
#define COL_ORANGE      \"{E09B1B}\"
#define COL_WHITE     \"{FFFFFF}\"
#define DIALOG_EVENT   1093
#define EVENT_FILE      \"Events/%d.ini\"
#define MAX_EVENTS      20
#define MAX_CP        50
#define MAX_TIME      15
new bool:False = false, _S_T_R_[128];
#define SendFormatMSG(%0,%1,%2,%3)\\
do{\\
   format(_S_T_R_, sizeof (_S_T_R_), (%2), %3);\\
   SendClientMessage((%0),(%1), _S_T_R_);\\
}\\
while (False)
#define SendFormatMSGToAll(%1,%2,%3)\\
do{\\
   format(_S_T_R_, sizeof (_S_T_R_), (%2), %3);\\
   SendClientMessageToAll((%1), _S_T_R_);\\
}\\
while (False)
#define randomEx(%0,%1)             (random((%1) - (%0)) + (%0))
new
EventName[MAX_PLAYERS][64],
EventCP[MAX_PLAYERS],
EventID[MAX_PLAYERS],
PlayerCP[MAX_PLAYERS],
EventVehID[MAX_PLAYERS],
PlayerVeh[MAX_PLAYERS],
bool:PlayerWork[MAX_PLAYERS],
bool:PlayerCreateEvent[MAX_PLAYERS],
bool:EventWithVeh[MAX_PLAYERS],
bool:EventWithWep[MAX_PLAYERS],
EventWeapID[MAX_PLAYERS],
Text:Event0[MAX_PLAYERS],
StartedEvent,
Timer,
StartedEventTime,
Position,
WithWeap[MAX_PLAYERS],
PlayerTime[MAX_PLAYERS],
Float:PlayerPos[MAX_PLAYERS][3],
PlayerPosInt[MAX_PLAYERS],
PlayerPosVW[MAX_PLAYERS];
enum jo
{
Float:TCPX,
Float:TCPY,
Float:TCPZ,
Float:TCPA,
Name[64],
VehID,
MaxCP,
WeapID
}
new Event[MAX_EVENTS][jo];
enum ev
{
Float:CPX,
Float:CPY,
Float:CPZ,
}
new CheckPoint[MAX_EVENTS][MAX_CP][ev];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" IG event készítõ by.: Mr. Gagi, magyarosítva: JBauer\");
print(\"--------------------------------------\\n\");
SetTimer(\"Time\",1000,true);
for(new i = 1; i<=MAX_EVENTS;i++)
{
new gFile[35];
format(gFile, 35, EVENT_FILE ,i);
INI_ParseFile(gFile, \"LoadEvent\", .bExtra = true, .extra = i);
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
 
main()
{
print(\"\\n----------------------------------\");
print(\" IG event készítõ by.: Mr. Gagi, magyarosítva: JBauer\");
print(\"----------------------------------\\n\");
}
 
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
Event0[playerid] = TextDrawCreate(55.000000, 247.000000, \"~Idõ: 2:50:3~n~CP: ~r~1/50\");
TextDrawBackgroundColor(Event0[playerid], 255);
TextDrawFont(Event0[playerid], 2);
TextDrawLetterSize(Event0[playerid], 0.210000, 1.099999);
TextDrawColor(Event0[playerid], -16711681);
TextDrawSetOutline(Event0[playerid], 1);
TextDrawSetProportional(Event0[playerid], 1);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(Event0[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
new cpid = PlayerCP[playerid];
new nextcpid = PlayerCP[playerid]+1;
new eventid = StartedEvent;
if(cpid >= 2)
{
if(GetPlayerVehicleID(playerid) == PlayerVeh[playerid])
{
PlayerCP[playerid]++;
if(CheckPoint[eventid][nextcpid][CPX] == 0.0 && CheckPoint[eventid][nextcpid][CPY] == 0)//Last Checkpoint
{
new string[128],Price;
Position++;
switch(Position)
{
case 1: Price = randomEx(7000,9000);
case 2: Price = randomEx(5000,7000);
case 3: Price = randomEx(3000,5000);
}
GivePlayerMoney(playerid,Price);
format(string,128,\"%s befejezte a versenyt %d helyezéssel és nyert %d$-t\",GetName(playerid),Position,Price);
SendClientMessageToAll(-1,string);
PlayerCP[playerid] = 0;
DestroyVehicle(PlayerVeh[playerid]);
DisablePlayerRaceCheckpoint(playerid);
PlayerWork[playerid] = false;
SetPlayerPos(playerid,PlayerPos[playerid][0],PlayerPos[playerid][1],PlayerPos[playerid][2]);
SetPlayerInterior(playerid,PlayerPosInt[playerid]);
SetPlayerVirtualWorld(playerid,PlayerPosVW[playerid]);
TextDrawHideForPlayer(playerid,Event0[playerid]);
if(Position == 3)
{
foreach(Player, i)
{
if(PlayerCP > 0)
{
PlayerCP = 0;
DestroyVehicle(PlayerVeh);
DisablePlayerRaceCheckpoint(i);
StartedEvent = 0;
SetPlayerPos(i,PlayerPos[0],PlayerPos[1],PlayerPos[2]);
SetPlayerInterior(i,PlayerPosInt);
SetPlayerVirtualWorld(i,PlayerPosVW);
TextDrawHideForPlayer(i,Event0);
}
}
}
return 1;
}
if(nextcpid != Event[eventid][MaxCP]) SetPlayerRaceCheckpoint(playerid,0,CheckPoint[eventid][nextcpid][CPX],CheckPoint[eventid][nextcpid][CPY],CheckPoint[eventid][nextcpid][CPZ],CheckPoint[eventid][nextcpid+1][CPX],CheckPoint[eventid][nextcpid+1][CPY],CheckPoint[eventid][nextcpid+1][CPZ],5.0);
else SetPlayerRaceCheckpoint(playerid,1,CheckPoint[eventid][nextcpid][CPX],CheckPoint[eventid][nextcpid][CPY],CheckPoint[eventid][nextcpid][CPZ],CheckPoint[eventid][nextcpid][CPX],CheckPoint[eventid][nextcpid][CPY],CheckPoint[eventid][nextcpid][CPZ],5.0);
}
}
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_FIRE)
{
if(PlayerCreateEvent[playerid] && EventWithVeh[playerid])
{
if(EventCP[playerid] == 1)
{
new dFile[32],Float:Pos[4];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
GetPlayerFacingAngle(playerid,Pos[3]);
format(dFile, 35, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
            INI_WriteString(File, \"Name\", EventName[playerid]);
          INI_WriteFloat(File, \"TCPX\", Pos[0]);
          INI_WriteFloat(File, \"TCPY\", Pos[1]);
          INI_WriteFloat(File, \"TCPZ\", Pos[2]);
          INI_WriteFloat(File, \"TCPA\", Pos[3]);
          INI_WriteInt(File, \"Veh\", EventVehID[playerid]);
          INI_WriteInt(File, \"Weapon\", 0);
          INI_Close(File);
           format(Event[EventID[playerid]][Name],64,\"%s\",EventName[playerid]);
   Event[EventID[playerid]][TCPX] = Pos[0];
   Event[EventID[playerid]][TCPY] = Pos[1];
   Event[EventID[playerid]][TCPZ] = Pos[2];
   Event[EventID[playerid]][TCPA] = Pos[3];
   Event[EventID[playerid]][VehID] = EventVehID[playerid];
   Event[EventID[playerid]][WeapID] = 0;
          EventCP[playerid]++;
}
else if(EventCP[playerid] > 1)
{
new dFile[32],Float:Pos[3],string[6];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(dFile, 35, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
            format(string,6,\"CPX%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[0]);
   CheckPoint[EventID[playerid]][EventCP[playerid]][CPX] = Pos[0];
          format(string,6,\"CPY%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[1]);
          CheckPoint[EventID[playerid]][EventCP[playerid]][CPY] = Pos[1];
          format(string,6,\"CPZ%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[2]);
   CheckPoint[EventID[playerid]][EventCP[playerid]][CPZ] = Pos[2];
          INI_Close(File);
          EventCP[playerid]++;
}
}
//==============DM Event
if(PlayerCreateEvent[playerid])
{
if(PlayerCreateEvent[playerid] && EventWithWep[playerid])
{
if(EventCP[playerid] == 1)
{
new dFile[32],Float:Pos[4];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
GetPlayerFacingAngle(playerid,Pos[3]);
format(dFile, 35, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
            INI_WriteString(File, \"Name\", EventName[playerid]);
          INI_WriteInt(File, \"Weapon\", EventWeapID[playerid]);
          INI_Close(File);
           format(Event[EventID[playerid]][Name],64,\"%s\",EventName[playerid]);
   Event[EventID[playerid]][WeapID] = EventWeapID[playerid];
          EventCP[playerid]++;
}
    if(EventCP[playerid] > 1)
{
new dFile[32],Float:Pos[3],string[6];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
format(dFile, 35, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
            format(string,6,\"CPX%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[0]);
   CheckPoint[EventID[playerid]][EventCP[playerid]][CPX] = Pos[0];
          format(string,6,\"CPY%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[1]);
          CheckPoint[EventID[playerid]][EventCP[playerid]][CPY] = Pos[1];
          format(string,6,\"CPZ%d\",EventCP[playerid]);
          INI_WriteFloat(File, string, Pos[2]);
   CheckPoint[EventID[playerid]][EventCP[playerid]][CPZ] = Pos[2];
          INI_Close(File);
          EventCP[playerid]++;
}
}
}
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_EVENT:
    {
    if(!response) return 1;
    switch(listitem)
       {
       case 0://Sa
           {
           SCM(playerid,-1,\"Válaszd ki az autót az eseményhez.\");
         ShowPlayerDialog(playerid,DIALOG_EVENT+1,DIALOG_STYLE_INPUT,\"Esemény név\",\"Írd be az esemény nevét\",\"Oké\",\"Mégse\");
         EventWithVeh[playerid] = true;
         }
       case 1://DM
           {
           SCM(playerid,-1,\"Válaszd ki a fegyvert az eseményhez.\");
         ShowPlayerDialog(playerid,DIALOG_EVENT+1,DIALOG_STYLE_INPUT,\"Esemény név\",\"Írd be az esemény nevét\",\"Oké\",\"Mégse\");
                    EventWithWep[playerid] = true;
         }
       }
    }
case DIALOG_EVENT+1:
{
     if(!response) return 1;
    if(EventWithVeh[playerid])
    {
    format(EventName[playerid],64,\"%s\",inputtext);
    ShowPlayerDialog(playerid,DIALOG_EVENT+2,DIALOG_STYLE_INPUT,\"Az esemény autója\",\"Írd be az autó idjét\",\"Oké\",\"Mégse\");
    }
    if(EventWithWep[playerid])
    {
    format(EventName[playerid],64,\"%s\",inputtext);
    ShowPlayerDialog(playerid,DIALOG_EVENT+3,DIALOG_STYLE_INPUT,\"Az esemény fegyvere\",\"Írd be a fegyver idjét\",\"Oké\",\"Mégse\");
}
}
case DIALOG_EVENT+2:
{
     if(!response) return 1;
    if(EventWithVeh[playerid])
    {
    EventCP[playerid] = 1;
    EventVehID[playerid] = strval(inputtext);
    SCM(playerid,-1,\"Nyomd le a BAL EGÉRGOMBOT, hogy beállítsd a cp-t. Ha befejezted írd be: /finishcevent\");
    }
}
case DIALOG_EVENT+3:
{
     if(!response) return 1;
      EventWeapID[playerid] = strval(inputtext);
      EventCP[playerid] = 1;
      SCM(playerid,-1,\"Nyomd le a BAL EGÉRGOMBOT, hogy beállítsd a játékosok kezdõ helyét. Ha befejezted írd be: /finishcevent\");
new dFile[32];
format(dFile, 35, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
            INI_WriteString(File, \"Name\", EventName[playerid]);
          INI_WriteInt(File, \"Weapon\", EventWeapID[playerid]);
          INI_Close(File);
           format(Event[EventID[playerid]][Name],64,\"%s\",EventName[playerid]);
   Event[EventID[playerid]][WeapID] = EventWeapID[playerid];
          EventCP[playerid]++;
}
case DIALOG_EVENT+4:
{
     if(!response) return 1;
StartedEvent = strval(inputtext);
StartedEventTime = MAX_TIME;
SendFormatMSGToAll(-1,\" Esemény: %s elindult. Maradt %d másodperced a csatlakozásra. Írd be: /join\",Event[strval(inputtext)][Name],MAX_TIME);
Timer = SetTimer(\"EventTime\",1000,true);
}
}
return 1;
}
forward EventTime();
public EventTime()
{
StartedEventTime--;
if(StartedEventTime == MAX_TIME/2) SendFormatMSGToAll(-1,\" %d másodperced maradt, hogy csatlakozz\",MAX_TIME/2);
if(StartedEventTime == 5)
{
SendClientMessageToAll(-1,\"Az esemény indul 5 másodperc múlva\");
}
if(StartedEventTime == 0)
{
foreach(Player, i)
{
if(PlayerCP > 0)
{
new string[128];
PlayerTime = 0;
SetPlayerRaceCheckpoint(i,0,CheckPoint[startedEvent][PlayerCP][CPX],CheckPoint[startedEvent][PlayerCP][CPY],CheckPoint[startedEvent][PlayerCP][CPZ],CheckPoint[startedEvent][PlayerCP+1][CPX],CheckPoint[startedEvent][PlayerCP+1][CPY],CheckPoint[startedEvent][PlayerCP+1][CPZ],5.0);
TogglePlayerControllable(i,true);
GameTextForPlayer(i,\"~g~GO GO GO!!!\",3000,0);
format(string,sizeof(string),\"Idõ: 00:00~n~CP: ~r~%d/%d\",PlayerCP-1,Event[startedEvent][MaxCP]);
TextDrawSetString(Event0,string);
PutPlayerInVehicle(i,PlayerVeh,0);
KillTimer(Timer);
}
if(Event[startedEvent][WeapID] != 0 && WithWeap == 1)
{
GameTextForPlayer(i,\"~g~GO GO GO!!!\",3000,0);
TogglePlayerControllable(i,true);
KillTimer(Timer);
}
}
}
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
YCMD:createevent(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new dFile[32];
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"RCON adminnak kell lenned!\");
if(PlayerCreateEvent[playerid]) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Már készítesz egy eseményt!\");
ShowPlayerDialog(playerid,DIALOG_EVENT,DIALOG_STYLE_LIST,\"Esemény\",\"Autókkal\\nDM esemény fegyverekkel\",\"Választ\",\"Mégse\");
PlayerCreateEvent[playerid] = true;
EventID[playerid] = 1;
for(new id = 1; id <= MAX_EVENTS;id++)
{
format(dFile, 35, EVENT_FILE, id);
if(fexist(dFile)) EventID[playerid]++;
if(EventID[playerid] > MAX_EVENTS) return SCM(playerid,-1,\"Írd át a MAX_EVENTS-et az FS-ben.\");
}
return 1;
}
YCMD:finishcevent(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new dFile[32];
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"RCON adminnak kell lenned!\");
if(!PlayerCreateEvent[playerid]) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Már készítesz egy eseményt!\");
SCM(playerid,-1,\"Befejezted az esemény készítést.\");
PlayerCreateEvent[playerid] = false;
if(EventWithVeh[playerid] || EventWithWep[playerid])
{
format(dFile, 32, EVENT_FILE, EventID[playerid]);
new
   INI:File = INI_Open(dFile);
          INI_WriteInt(File, \"MaxCP\", EventCP[playerid]-1);
          Event[EventID[playerid]][MaxCP] = EventCP[playerid]-1;
          INI_Close(File);
}
return 1;
}
YCMD:finishdmevent(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem vagy RCON admin!\");
if(StartedEvent == 0) return SCM(playerid,COLOR_RED,\"Nincsen elindított esemény\");
if(Event[startedEvent][WeapID] == 0) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nincsen elindítva DM esemény!\");
foreach(Player, i)
{
if(WithWeap == 1)
{
WithWeap = 0;
SetPlayerAmmo(i,Event[startedEvent][WeapID],0);
SetPlayerPos(i,PlayerPos[0],PlayerPos[1],PlayerPos[2]);
SetPlayerInterior(i,PlayerPosInt);
SetPlayerVirtualWorld(i,PlayerPosVW);
}
}
StartedEvent = 0;
return 1;
}
YCMD:join(playerid,params[],help)
{
#pragma unused help
#pragma unused params
new string[128];
if(StartedEvent == 0) return SCM(playerid,COLOR_RED,\"Nincsen elindított esemény\");
if(StartedEventTime == 0) return SCM(playerid,COLOR_RED,\"Már elkezdõdött.\");
new Float:Pos[3]; GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
if(Event[startedEvent][WeapID] == 0)
{
Event[startedEvent][TCPX] -= (6 * floatsin(-Event[startedEvent][TCPA], degrees));
Event[startedEvent][TCPY] -= (6 * floatcos(-Event[startedEvent][TCPA], degrees));
printf(\"%f\",Event[startedEvent][TCPX]);
PlayerCP[playerid] = 2;
PlayerTime[playerid] = 0;
if(Event[startedEvent][VehID] != 0) { PlayerVeh[playerid] = CreateVehicle(Event[startedEvent][VehID],Event[startedEvent][TCPX],Event[startedEvent][TCPY],Event[startedEvent][TCPZ],Event[startedEvent][TCPA],random(128),random(128),3600);}
SetPlayerPos(playerid,Event[startedEvent][TCPX],Event[startedEvent][TCPY],Event[startedEvent][TCPZ]);
PutPlayerInVehicle(playerid,PlayerVeh[playerid],0);
PlayerPos[playerid][0] = Pos[0];
PlayerPos[playerid][1] = Pos[1];
PlayerPos[playerid][2] = Pos[2];
PlayerPosInt[playerid] = GetPlayerInterior(playerid);
PlayerPosVW[playerid] = GetPlayerVirtualWorld(playerid);
format(string,sizeof(string),\"Idõ: 00:00~n~CP: ~r~%d/%d\",PlayerCP[playerid]-1,Event[startedEvent][MaxCP]);
TextDrawSetString(Event0[playerid],string);
TextDrawShowForPlayer(playerid,Event0[playerid]);
TogglePlayerControllable(playerid,false);
}
if(Event[startedEvent][WeapID] != 0)
{
new cp = randomEx(2,Event[startedEvent][MaxCP]);
SetPlayerPos(playerid,CheckPoint[startedEvent][cp][CPX],CheckPoint[startedEvent][cp][CPY],CheckPoint[startedEvent][cp][CPZ]);
GivePlayerWeapon(playerid,Event[startedEvent][WeapID],999);
PlayerPos[playerid][0] = Pos[0];
PlayerPos[playerid][1] = Pos[1];
PlayerPos[playerid][2] = Pos[2];
PlayerPosInt[playerid] = GetPlayerInterior(playerid);
PlayerPosVW[playerid] = GetPlayerVirtualWorld(playerid);
TogglePlayerControllable(playerid,false);
WithWeap[playerid] = 1;
}
return 1;
}
YCMD:startevent(playerid,params[],help)
{
#pragma unused help
#pragma unused params
if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"RCON adminnak kell lenned!\");
new exist[32],string[256],e[2];
        for(new i = 1; i <= MAX_EVENTS; i++)
        {
        format(exist, sizeof(exist), EVENT_FILE, i);
                if(fexist(exist))
                        {
                                new a[12];
                                valstr(a, i);
                                strcat(string, a);
                                strcat(string, \") ID: \");
                                format(e,2,\"%d\",i);
                                strcat(string, e);
                                strcat(string, \" | \");
                                strcat(string, Event[Name]);
                                strcat(string, \"\\n\");
                        }
        }
ShowPlayerDialog(playerid,DIALOG_EVENT+4,DIALOG_STYLE_INPUT,\"Események\",string,\"Indít\",\"Mégse\");
return 1;
}
stock GetName(playerid)
{
    new
        pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
//Load
forward LoadEvent(id, name[], value[]);
public LoadEvent(id, name[], value[])
{
new string[6];
    INI_String(\"Name\", Event[id][Name],64);
    INI_Float(\"TCPX\", Event[id][TCPX]);
    INI_Float(\"TCPY\", Event[id][TCPY]);
    INI_Float(\"TCPZ\", Event[id][TCPZ]);
    INI_Float(\"TCPA\", Event[id][TCPA]);
    INI_Int(\"Veh\", Event[id][VehID]);
INI_Int(\"Weapon\", Event[id][WeapID]);
    for(new i = 2;i <= MAX_CP;i++)
    {
    format(string,6,\"CPX%d\",i);
    INI_Float(string, CheckPoint[id][CPX]);
    format(string,6,\"CPY%d\",i);
    INI_Float(string, CheckPoint[id][CPY]);
    format(string,6,\"CPZ%d\",i);
    INI_Float(string, CheckPoint[id][CPZ]);
    }
    INI_Int(\"MaxCP\", Event[id][MaxCP]);
    return 1;
}
forward Time();
public Time()
{
foreach(Player, i)
{
if(PlayerCP > 0 && StartedEventTime == 0)
{
PlayerTime++;
new Min=floatround(PlayerTime/60);
new Sec=PlayerTime-(Min*60);
new string[128];
format(string,sizeof(string),\"Idõ: %02d:%02d~n~CP: ~r~%d/%d\",Min,Sec,PlayerCP-1,Event[startedEvent][MaxCP]);
TextDrawSetString(Event0,string);
}
}
}

1287
SA-MP: Szerverfejlesztés / Car Ownership by Mr.Gagi
« Dátum: 2012. május 05. - 21:40:59 »
Sziasztok. Most találtam a www.sa-mp.com -on ezt a filterscriptet, mely igazából egy autó rendszer. Letöltöttem majd lemagyarosítottam. Remélem tetszeni fog!
Eredeti link: http://forum.sa-mp.com/showthread.php?p=1767935#post1767935
Magyar pwn fájl: http://data.hu/get/5079207/CoS.pwn
Magyar amx fájl: http://data.hu/get/5079206/CoS.amx
Scriptfiles: http://data.hu/get/5079205/scriptfiles.7z
Pastebin: http://pastebin.com/4m7MB5R3
Parancsok:
/buycar - Ide majd be kell írnod a te koordinátáidat (fs eleje) - autóvétel
/stopbuying - autóvétel vége
/v - az autóval végezhetõ dolgok (pl.: szín váltás)
/gpsoff - kikapcsolja a keresést
/cwithdraw - pénzt raksz be az autóba
/cdeposit - pénz veszel ki az autóból
/cputgun - fegyvert raksz be az autóba
/ctakegun - fegyvert veszel ki az autóból
/sellto - eladod az autót egy játékosnak
/acceptsell - megveszed az autót egy másik játékostól
/refusesell - nem veszed meg az autót egy másik játékostól
Várható még egy IG \"event\" készítõ és egy házrendszer, szintén Gagitól.
Remélem tetszeni fog!
JBauer
 
//Source for max car speed: http://gta.wikia.com/Vehicle_Stats_in_GTA_San_Andreas
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf2>
#include <YSI/y_ini>
#include <YSI\\y_commands>
#include <fixchars>
#pragma tabsize 0
#define COORDINATES 1539.8837,-1727.0519,13.5469//Ide írd be a koordinátákat
#define COORDINATES_FOR_BUY 1419.2805,-1727.1952,13.5391//A /autovesz koordinátája
#define SPAWN_cX 1419.2805//A megvett autó X koordinátája
#define SPAWN_cY -1727.1952//A megvett autó Y koordinátája
#define SPAWN_cZ 13.5391//A megvett autó Z koordinátája
#define SPAWN_cA 90//A megvett autó forgása
#define COLOR_RED 0xCF212D
#define SCM SendClientMessage
#define NUMBER_FOR_LOAD 2
#define MAX_CARS  1000
#define NUMBER_OF_VEHICLES 4
#define Player_File \"CoS/Player/%s.ini\"
#define CoS_File \"CoS/%d.ini\"
#define DIALOG_CARS 1390
new bool:False = false, _S_T_R_[128];
#define SendFormatMSG(%0,%1,%2,%3)\\
do{\\
   format(_S_T_R_, sizeof (_S_T_R_), (%2), %3);\\
   SendClientMessage((%0),(%1), _S_T_R_);\\
}\\
while (False)
#define COL_WHITE  \"{FFFFFF}\"
new
VehicleID,
ChoosedCar,
Text:CoSTD0[MAX_PLAYERS],
bool:PlayerSwitchVehicle[MAX_PLAYERS],
bool:PlayerChooseVehicle,
maximalcars,
GPSOn[MAX_PLAYERS],
Seller[MAX_PLAYERS],
Priceo[MAX_PLAYERS],
Text:AlarmTD0[MAX_PLAYERS],
Text:AlarmTD1[MAX_PLAYERS],
AlarmChoose[MAX_PLAYERS],
AlarmChooseID[MAX_PLAYERS];
enum cars
{
Model,
Price,
Level,
Speed
}
new CarModel[NUMBER_OF_VEHICLES][cars];
enum data
{
Veh1,
Veh2,
Veh3
}
new Player[MAX_PLAYERS][data];
enum cdata
{
Model,
Float:cX,
Float:cY,
Float:cZ,
Float:cA,
Col1,
Col2,
Lock,
Owner[32],
ID,
Money,
Gun1,Ammo1,
Gun2,Ammo2,
Alarm
}
new C_Data[MAX_CARS][cdata];
new CarNames[][] =
{
    \"Landstalker\", \"Bravura\", \"Buffalo\", \"Linerunner\", \"Perrenial\", \"Sentinel\",
        \"Dumper\", \"Firetruck\", \"Trashmaster\", \"Stretch\", \"Manana\", \"Infernus\", \"Voodoo\",
        \"Pony\", \"Mule\", \"Cheetah\", \"Ambulance\", \"Leviathan\", \"Moonbeam\", \"Esperanto\",
        \"Taxi\", \"Washington\", \"Bobcat\", \"Whoopee\", \"BF Injection\", \"Hunter\", \"Premier\",
        \"Enforcer\", \"Securicar\", \"Banshee\", \"Predator\", \"Bus\", \"Rhino\", \"Barracks\",
        \"Hotknife\", \"Trailer 1\", \"Previon\", \"Coach\", \"Cabbie\", \"Stallion\", \"Rumpo\",
        \"RC Bandit\", \"Romero\", \"Packer\", \"Monster\", \"Admiral\", \"Squalo\", \"Seasparrow\",
    \"Pizzaboy\", \"Tram\", \"Trailer 2\", \"Turismo\", \"Speeder\", \"Reefer\", \"Tropic\", \"Flatbed\",
        \"Yankee\", \"Caddy\", \"Solair\", \"Berkley\'s RC Van\", \"Skimmer\", \"PCJ-600\", \"Faggio\",
        \"Freeway\", \"RC Baron\", \"RC Raider\", \"Glendale\", \"Oceanic\", \"Sanchez\", \"Sparrow\",
        \"Patriot\", \"Quad\", \"Coastguard\", \"Dinghy\", \"Hermes\", \"Sabre\", \"Rustler\", \"ZR-350\",
        \"Walton\", \"Regina\", \"Comet\", \"BMX\", \"Burrito\", \"Camper\", \"Marquis\", \"Baggage\",
        \"Dozer\", \"Maverick\", \"Chopper\", \"Rancher\", \"FBI Rancher\", \"Virgo\", \"Greenwood\",
        \"Jetmax\", \"Hotring\", \"Sandking\", \"Blista Compact\", \"Police Maverick\", \"Boxvillde\",
        \"Benson\", \"Mesa\", \"RC Goblin\", \"Hotring Racer A\", \"Hotring Racer B\", \"Bloodring Banger\",
        \"Rancher\", \"Super GT\", \"Elegant\", \"Journey\", \"Bike\", \"Mountain Bike\", \"Beagle\",
        \"Cropduster\", \"Stunt\", \"Tanker\", \"Roadtrain\", \"Nebula\", \"Majestic\", \"Buccaneer\",
        \"Shamal\", \"Hydra\", \"FCR-900\", \"NRG-500\", \"HPV1000\", \"Cement Truck\", \"Tow Truck\",
    \"Fortune\", \"Cadrona\", \"FBI Truck\", \"Willard\", \"Forklift\", \"Tractor\", \"Combine\",
        \"Feltzer\", \"Remington\", \"Slamvan\", \"Blade\", \"Freight\", \"Streak\", \"Vortex\", \"Vincent\",
        \"Bullet\", \"Clover\", \"Sadler\", \"Firetruck\", \"Hustler\", \"Intruder\", \"Primo\", \"Cargobob\",
        \"Tampa\", \"Sunrise\", \"Merit\", \"Utility\", \"Nevada\", \"Yosemite\", \"Windsor\", \"Monster\",
        \"Monster\", \"Uranus\", \"Jester\", \"Sultan\", \"Stratum\", \"Elegy\", \"Raindance\", \"RC Tiger\",
        \"Flash\", \"Tahoma\", \"Savanna\", \"Bandito\", \"Freight Flat\", \"Streak Carriage\", \"Kart\",
        \"Mower\", \"Dune\", \"Sweeper\", \"Broadway\", \"Tornado\", \"AT-400\", \"DFT-30\", \"Huntley\",
        \"Stafford\", \"BF-400\", \"News Van\", \"Tug\", \"Trailer 3\", \"Emperor\", \"Wayfarer\", \"Euros\",
        \"Hotdog\", \"Club\", \"Freight Box\", \"Trailer\", \"Andromada\", \"Dodo\", \"RC Cam\", \"Launch\",
        \"LSPD Car\", \"SFPD Car\", \"LVPD Car\", \"Police Ranger\", \"Picador\", \"S.W.A.T Tank\", \"Alpha\",
        \"Phoenix\", \"Glendale\", \"Sadler\", \"Luggage Trailer 1\", \"Luggage Trailer 2\", \"Stairs Trailer\",
    \"Boxville\", \"Utility Trailer 1\", \"Utility Trailer 2\"
};
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" CoS by Mr.Gagi Magyarosítva: JBauer\");
print(\"--------------------------------------\\n\");
    AddMoreCar(404,5000,150,2);
AddMoreCar(405,9000,165,3);
AddMoreCar(415,19000,230,7);
AddMoreCar(421,10000,180,5);
VehicleID = AddStaticVehicleEx(CarModel[1][Model],COORDINATES,1,1,3600);
new gFile[35];
for(new i = NUMBER_FOR_LOAD; i <= MAX_CARS;i++)
{
format(gFile, 35, CoS_File,i);
INI_ParseFile(gFile, \"LoadCar\", .bExtra = true, .extra = i);
C_Data[iD] = CreateVehicle(C_Data[Model], C_Data[cX],C_Data[cY],C_Data[cZ],C_Data[cA], C_Data[Col1], C_Data[Col2], 30000);
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
 
main()
{
print(\"\\n----------------------------------\");
print(\" CoS by Mr.Gagi Magyarosítva: JBauer\");
print(\"----------------------------------\\n\");
}
public OnGameModeInit()
{
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
return 1;
}
stock GetName(playerid)
{
    new
        pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    return pName;
}
public OnPlayerConnect(playerid)
{
CoSTD0[playerid] = TextDrawCreate(270.000000, 371.000000, \"~y~Típus: ~w~Cheetah   ~y~Ár: ~g~$5~n~          ~y~Maximális sebesség: ~w~200\");
TextDrawBackgroundColor(CoSTD0[playerid], 255);
TextDrawFont(CoSTD0[playerid], 2);
TextDrawLetterSize(CoSTD0[playerid], 0.370000, 1.000000);
TextDrawColor(CoSTD0[playerid], -1);
TextDrawSetOutline(CoSTD0[playerid], 1);
TextDrawSetProportional(CoSTD0[playerid], 1);
AlarmTD0[playerid] = TextDrawCreate(40.000000, 150.000000, \"~n~\");
TextDrawBackgroundColor(AlarmTD0[playerid], 255);
TextDrawFont(AlarmTD0[playerid], 1);
TextDrawLetterSize(AlarmTD0[playerid], 0.360000, 3.300000);
TextDrawColor(AlarmTD0[playerid], -1);
TextDrawSetOutline(AlarmTD0[playerid], 0);
TextDrawSetProportional(AlarmTD0[playerid], 1);
TextDrawSetShadow(AlarmTD0[playerid], 1);
TextDrawUseBox(AlarmTD0[playerid], 1);
TextDrawBoxColor(AlarmTD0[playerid], -206);
TextDrawTextSize(AlarmTD0[playerid], 117.000000, 0.000000);
AlarmTD1[playerid] = TextDrawCreate(40.000000, 150.000000, \"~p~~h~Riasztó: ~r~BE~n~~n~~p~~h~Riasztó: ~w~KI\");
TextDrawBackgroundColor(AlarmTD1[playerid], 255);
TextDrawFont(AlarmTD1[playerid], 2);
TextDrawLetterSize(AlarmTD1[playerid], 0.290000, 0.899999);
TextDrawColor(AlarmTD1[playerid], -1);
TextDrawSetOutline(AlarmTD1[playerid], 1);
TextDrawSetProportional(AlarmTD1[playerid], 1);
new pFile[48];
format(pFile, 48, Player_File, GetName(playerid));
if(!fexist(pFile))
{
    new
    INI:UserFile = INI_Open(pFile);
    INI_WriteInt(UserFile, \"Veh1\",9999);
    INI_WriteInt(UserFile, \"Veh2\", 9999);
    INI_WriteInt(UserFile, \"Veh3\", 9999);
    INI_Close(UserFile);
}
INI_ParseFile(pFile, \"LoadPlayerData\", .bExtra = true, .extra = playerid);
Priceo[playerid] = 0;
Seller[playerid] = 999;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
TextDrawDestroy(CoSTD0[playerid]);
TextDrawDestroy(AlarmTD0[playerid]);
TextDrawDestroy(AlarmTD1[playerid]);
new
        pFile[35];
   format(pFile, 35, Player_File, GetName(playerid));
    new
    INI:UserFile = INI_Open(pFile);
    INI_WriteInt(UserFile, \"Veh1\", Player[playerid][Veh1]);
    INI_WriteInt(UserFile, \"Veh2\", Player[playerid][Veh2]);
    INI_WriteInt(UserFile, \"Veh3\", Player[playerid][Veh3]);
    INI_Close(UserFile);
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
 
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)//TU STAo
{
new Float:Pos[3],string[128]; GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
if(vehicleid == VehicleID) return SCM(playerid,-1,\"Nem tudsz beülni az autóba.\"),SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
if(C_Data[vehicleid][Lock] == 1) return GameTextForPlayer(playerid,\"~r~Az autó zárva van\",3000,0),SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
if(C_Data[vehicleid][Alarm] == 1)
{
format(string,128,\"*%s megpróbálja ellopni az autót.\",GetName(playerid));
    ProxDetector(playerid, string, 0xB91BE0, 30);
    SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
    return 1;
}
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_SECONDARY_ATTACK)
{
if(AlarmChoose[playerid] == 1)
{
            AlarmChoose[playerid] = 0;
            C_Data[AlarmChooseID[playerid]][Alarm] = 1;
            TextDrawHideForPlayer(playerid,AlarmTD0[playerid]);
            TextDrawHideForPlayer(playerid,AlarmTD1[playerid]);
            SCM(playerid,-1,\"A riasztó bekapcsolva\");
            CheckCar(AlarmChooseID[playerid]);
            RemovePlayerFromVehicle(playerid);
         }
if(AlarmChoose[playerid] == 2)
{
            AlarmChoose[playerid] = 0;
            C_Data[AlarmChooseID[playerid]][Alarm] = 0;
            TextDrawHideForPlayer(playerid,AlarmTD0[playerid]);
            TextDrawHideForPlayer(playerid,AlarmTD1[playerid]);
            SCM(playerid,-1,\"A riasztó kikapcsolva.\");
            CheckCar(AlarmChooseID[playerid]);
            RemovePlayerFromVehicle(playerid);
         }
     if(PlayerSwitchVehicle[playerid] == true)
{
      if(Player[playerid][Veh1] == 9999 || Player[playerid][Veh2] == 9999 || Player[playerid][Veh3] == 9999)
      {
      if(GetPlayerMoney(playerid) < CarModel[ChoosedCar][Price]) return SCM(playerid,-1,\"Nincsen elég pénzed.\");
      if(GetPlayerScore(playerid) < CarModel[ChoosedCar][Level]) return SCM(playerid,-1,\"Nincsen elég pontod.\");
      new i = GetNextFreeID();
                SetCameraBehindPlayer(playerid);
      SendFormatMSG(playerid,-1,\"Megvetted az autót %d$-ért\",CarModel[ChoosedCar][Price]);
      GivePlayerMoney(playerid,-CarModel[ChoosedCar][Price]);
      C_Data[Model] = CarModel[ChoosedCar][Model];
      C_Data[cX] = SPAWN_cX;
      C_Data[cY] = SPAWN_cY;
      C_Data[cZ] = SPAWN_cZ;
      C_Data[cA] = SPAWN_cA;
      C_Data[Col1] = 1;
      C_Data[Col2] = 1;
      C_Data[Lock] = 0;
      strmid(C_Data[Owner], GetName(playerid), 0, strlen(GetName(playerid)), 999);
                TogglePlayerControllable(playerid, 1);
                C_Data[iD] = CreateVehicle(C_Data[Model], C_Data[cX],C_Data[cY],C_Data[cZ],C_Data[cA], C_Data[Col1], C_Data[Col2], 30000);
                CreateSaveCar(i);
       PlayerSwitchVehicle[playerid] = false;
                PlayerChooseVehicle = false;
                SetCameraBehindPlayer(playerid);
      TextDrawHideForPlayer(playerid,CoSTD0[playerid]);
      if(Player[playerid][Veh1] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999) {Player[playerid][Veh1] = C_Data[iD];}
      else if(Player[playerid][Veh2] != 9999 && Player[playerid][Veh1] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh1] = C_Data[iD];}
             else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh2] = C_Data[iD];}
             else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999){Player[playerid][Veh2] = C_Data[iD];}
          else if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] != 9999){Player[playerid][Veh3] = C_Data[iD];}
          UpdatePlayerInfo(playerid);
          }
          else
          {
          SCM(playerid,-1,\"Már van 3 autód (Ez a maximum)!\");
          }
       }
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
    new Keys, ud, lr;
    GetPlayerKeys(playerid, Keys, ud, lr);
   if(ud > 0)
      {
         if(AlarmChoose[playerid] == 1)
         {
          AlarmChoose[playerid] = 2;
          TextDrawSetString(AlarmTD1[playerid],\"~p~~h~Riasztó: ~w~BE~n~~n~~p~~h~Riasztó: ~r~KI\");
          }
         else if(AlarmChoose[playerid] == 2)
         {
          AlarmChoose[playerid] = 1;
          TextDrawSetString(AlarmTD1[playerid],\"~p~~h~Riasztó: ~r~BE~n~~n~~p~~h~Riasztó: ~w~KI\");
          }
       }
if(PlayerSwitchVehicle[playerid] == true)
{
new string[128];
    GetPlayerKeys(playerid, Keys, ud, lr);
   if(lr > 0)
      {
         ChoosedCar++;
         if(ChoosedCar > maximalcars) {ChoosedCar = 0;}
         DestroyVehicle(VehicleID);
         VehicleID = CreateVehicle(CarModel[ChoosedCar][Model], COORDINATES, 1,1, 30000);
         format(string,sizeof(string),\"~y~Név: ~w~%s   ~y~Ár: ~g~$%d~n~~y~Szint: ~w~%d~y~  Maximum sebesség: ~w~%d\",CarNames[CarModel[ChoosedCar][Model] - 400],CarModel[ChoosedCar][Price],CarModel[ChoosedCar][Level],CarModel[ChoosedCar][speed]);
         TextDrawSetString(CoSTD0[playerid],string);
      }
      else if(lr < 0)
      {
         ChoosedCar--;
         if (ChoosedCar < 0) {ChoosedCar = maximalcars;}
         DestroyVehicle(VehicleID);
         VehicleID = CreateVehicle(CarModel[ChoosedCar][Model], COORDINATES, 1,1, 30000);
         format(string,sizeof(string),\"~y~Név: ~w~%s   ~y~Ár: ~g~$%d~n~~y~Szint: ~w~%d~y~  Maximum sebesség: ~w~%d\",CarNames[CarModel[ChoosedCar][Model] - 400],CarModel[ChoosedCar][Price],CarModel[ChoosedCar][Level],CarModel[ChoosedCar][speed]);
         TextDrawSetString(CoSTD0[playerid],string);
      }
}
      return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
   case DIALOG_CARS+1:
   {
   if(!response) return SCM(playerid,-1,\"Dialog bezárva\");
    new vehicleid = GetPlayerVehicleID(playerid);
    switch(listitem)
    {
    case 0: {
            if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Az autóban kell ülnöd!\");
    ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,\"Szín\",\"Ára: $200\\nÍrd be a színeket (szín id-t).\\n Példa: 5 9\",\"Vált\",\"Mégse\"); }
    case 1: {
    ShowPlayerDialog(playerid,DIALOG_CARS+5,DIALOG_STYLE_LIST,\"Autókezelõ panel\",\"Elsõ autó\\nMásodik autó\\nHarmadik autó\",\"Zárás\",\"Mégse\");
      }
    case 2: {
    ShowPlayerDialog(playerid,DIALOG_CARS+2,DIALOG_STYLE_LIST,\"Autókezelõ panel\",\"Elsõ autó\\nMásodik autó\\nHarmadik autó\",\"Kinyitás\",\"Mégse\");
             }
    case 3: {
         new string[128];
           if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Autóban kell ülnöd!\");
   new price = GetVehiclePrice(GetVehicleModel(vehicleid));
   if(Player[playerid][Veh3] == 0 && Player[playerid][Veh2] == 0 && Player[playerid][Veh1] == 0) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
   GivePlayerMoney(playerid, price/2);
   SendFormatMSG(playerid,-1,\"Eladtad az autódat %d$-ért\",price/2);
   DestroyVehicle(vehicleid);
   if(Player[playerid][Veh1] == vehicleid)
   {
   format(string,sizeof(string),CoS_File,C_Data[vehicleid][iD]);
            C_Data[vehicleid][cX] = 0;
            C_Data[vehicleid][cY] = 0;
            C_Data[vehicleid][cZ] = 0;
            C_Data[vehicleid][Model] = 0;
            format(C_Data[vehicleid][Owner],128,\"Department\");
            CheckCar(Player[playerid][Veh1]);
   Player[playerid][Veh1] = 0;
   UpdatePlayerInfo(playerid);
   }
   else if(Player[playerid][Veh2] == vehicleid)
   {
   format(string,sizeof(string),CoS_File,C_Data[vehicleid][iD]);
            C_Data[vehicleid][cX] = 0;
            C_Data[vehicleid][cY] = 0;
            C_Data[vehicleid][cZ] = 0;
            C_Data[vehicleid][Model] = 0;
            format(C_Data[vehicleid][Owner],128,\"Department\");
            CheckCar(Player[playerid][Veh2]);
   Player[playerid][Veh2] = 0;
   UpdatePlayerInfo(playerid);
   }
   else if(Player[playerid][Veh3] == vehicleid)
   {
   format(string,sizeof(string),CoS_File,C_Data[vehicleid][iD]);
            C_Data[vehicleid][cX] = 0;
            C_Data[vehicleid][cY] = 0;
            C_Data[vehicleid][cZ] = 0;
            C_Data[vehicleid][Model] = 0;
            format(C_Data[vehicleid][Owner],128,\"Department\");
            CheckCar(Player[playerid][Veh3]);
   Player[playerid][Veh3] = 0;
   UpdatePlayerInfo(playerid);
   }
   }
    case 4: {
    if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Nem ülsz autóban!\");
            new Float:Pos[4]; GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); GetVehicleZAngle(vehicleid, Pos[3]);
           C_Data[vehicleid][cX] = Pos[0];
           C_Data[vehicleid][cY] = Pos[1];
              C_Data[vehicleid][cZ] = Pos[2];
           C_Data[vehicleid][cA] = Pos[3];
   SetVehiclePos(vehicleid, C_Data[vehicleid][cX],C_Data[vehicleid][cY],C_Data[vehicleid][cZ]);
   SetVehicleZAngle(vehicleid, C_Data[vehicleid][cA]);
   SCM(playerid,-1,\"Autó leparkolva.\");
   CheckCar(C_Data[vehicleid][iD]);}
    case 5: {
    ShowPlayerDialog(playerid,DIALOG_CARS+3,DIALOG_STYLE_LIST,\"Autókezelõ panel\",\"Elsõ autó\\nMásodik autó\\nHarmadik autó\",\"Kinyit\",\"Mégse\");
             }
    case 6: {
    ShowPlayerDialog(playerid,DIALOG_CARS+4,DIALOG_STYLE_LIST,\"Autókezelõ panel\",\"Elsõ autó\\nMásodik autó\\nHarmadik autó\",\"Választ\",\"Mégse\");
             }
    }
           }
           case DIALOG_CARS+4://For alarm
           {
           if(!response) return 1;
           switch(listitem)
           {
           case 0:
           {
           new id = Player[playerid][Veh1];
           new Float:Pos[3]; GetVehiclePos(id,Pos[0],Pos[1],Pos[2]);
           if(id == 999) return SCM(playerid,-1,\"Nincsen autód ezen a sloton.\");
           if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,-1,\"Nem vagy az autód közelében.\");
    AlarmChoose[playerid] = 1;
    AlarmChooseID[playerid] = id;
    TextDrawShowForPlayer(playerid,AlarmTD0[playerid]);
    TextDrawShowForPlayer(playerid,AlarmTD1[playerid]);
    TextDrawSetString(AlarmTD1[playerid],\"~p~~h~Riasztó: ~r~BE~n~~n~~p~~h~Riasztó: ~w~KI\");
    }
           case 1:
           {
           new id = Player[playerid][Veh2];
           new Float:Pos[3]; GetVehiclePos(id,Pos[0],Pos[1],Pos[2]);
           if(id == 999) return SCM(playerid,-1,\"Nincsen autód ezen a sloton\");
           if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,-1,\"Nem vagy az autód közelében.\");
    AlarmChoose[playerid] = 1;
    AlarmChooseID[playerid] = id;
    TextDrawShowForPlayer(playerid,AlarmTD0[playerid]);
    TextDrawShowForPlayer(playerid,AlarmTD1[playerid]);
    TextDrawSetString(AlarmTD1[playerid],\"~p~~h~Riasztó: ~r~BE~n~~n~~p~~h~Riasztó: ~w~KI\");
    }
           case 2:
           {
           new id = Player[playerid][Veh3];
           new Float:Pos[3]; GetVehiclePos(id,Pos[0],Pos[1],Pos[2]);
           if(id == 999) return SCM(playerid,-1,\"Nincsen autód ezen a sloton\");
           if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,-1,\"Nem vagy az autód közelében.\");
    AlarmChoose[playerid] = 1;
    AlarmChooseID[playerid] = id;
    TextDrawShowForPlayer(playerid,AlarmTD0[playerid]);
    TextDrawShowForPlayer(playerid,AlarmTD1[playerid]);
    TextDrawSetString(AlarmTD1[playerid],\"~p~~h~Riasztó: ~r~BE~n~~n~~p~~h~Riasztó: ~w~KI\");
    }
    }
           }
           
   case DIALOG_CARS+2:
   {
   switch(listitem)
   {
      case 0: {
            if(Player[playerid][Veh1] != 9999) { C_Data[Player[playerid][Veh1]][Lock] = 0; CheckCar(Player[playerid][Veh1]); } }
      case 1: {
            if(Player[playerid][Veh2] != 9999) { C_Data[Player[playerid][Veh2]][Lock] = 0; CheckCar(Player[playerid][Veh2]); } }
      case 2: {
            if(Player[playerid][Veh3] != 9999) { C_Data[Player[playerid][Veh3]][Lock] = 0; CheckCar(Player[playerid][Veh3]); } }
            }
           }
   case DIALOG_CARS+3://Dialog for locate
   {
   switch(listitem)
   {
      case 0: {
            if(Player[playerid][Veh1] != 9999) {new Float:Postition[3]; GPSOn[playerid] = true; GetVehiclePos(Player[playerid][Veh1],Postition[0],Postition[1],Postition[2]); SetPlayerCheckpoint(playerid,Postition[0],Postition[1],Postition[2],5.0); SCM(playerid,-1,\"Vehicle is located for turn of GPS type /gpsoff\");} }
      case 1: {
            if(Player[playerid][Veh2] != 9999) {new Float:Postition[3]; GPSOn[playerid] = true; GetVehiclePos(Player[playerid][Veh2],Postition[0],Postition[1],Postition[2]); SetPlayerCheckpoint(playerid,Postition[0],Postition[1],Postition[2],5.0); SCM(playerid,-1,\"Vehicle is located for turn of GPS type /gpsoff\");} }
      case 2: {
            if(Player[playerid][Veh3] != 9999) {new Float:Postition[3]; GPSOn[playerid] = true; GetVehiclePos(Player[playerid][Veh3],Postition[0],Postition[1],Postition[2]); SetPlayerCheckpoint(playerid,Postition[0],Postition[1],Postition[2],5.0); SCM(playerid,-1,\"Vehicle is located for turn of GPS type /gpsoff\");} }
            }
           }
           case DIALOG_CARS://For color
   {
   new vehicleid = GetPlayerVehicleID(playerid),col[2];
   if(sscanf(inputtext,\"ii\",col[0],col[1])) return ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,\"Szín\",\"Írd be a színt (A szín id-jét).\\n Példa: 5 9\",\"Vált\",\"Mégse\");
   C_Data[vehicleid][Col1] = col[0];
   C_Data[vehicleid][Col2] = col[1];
   GivePlayerMoney(playerid,-200);
   ChangeVehicleColor(vehicleid,col[0],col[1]);
   CheckCar(vehicleid);
   }
   case DIALOG_CARS+5://For lock
   {
   switch(listitem)
   {
      case 0: {
            if(Player[playerid][Veh1] != 9999) { C_Data[Player[playerid][Veh1]][Lock] = 1; CheckCar(Player[playerid][Veh1]); } }
      case 1: {
            if(Player[playerid][Veh2] != 9999) { C_Data[Player[playerid][Veh2]][Lock] = 1; CheckCar(Player[playerid][Veh2]); } }
      case 2: {
            if(Player[playerid][Veh3] != 9999) { C_Data[Player[playerid][Veh3]][Lock] = 1; CheckCar(Player[playerid][Veh3]); } }
            }
           }
      }
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
forward LoadPlayerData(playerid, name[], value[]);
public LoadPlayerData(playerid, name[], value[])
{
    INI_Int(\"Veh1\", Player[playerid][Veh1]);
    INI_Int(\"Veh2\", Player[playerid][Veh2]);
    INI_Int(\"Veh3\", Player[playerid][Veh3]);
    return 1;
}
//Commands
YCMD:autovesz(playerid,params[],help)
{
#pragma unused params
#pragma unused help
if(PlayerChooseVehicle) return SCM(playerid,COLOR_RED,\"EROR: \"COL_WHITE\"Valaki már megvette az autót.\");
if(!IsPlayerInRangeOfPoint(playerid,20.0,COORDINATES_FOR_BUY)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem vagy azon a helyen ahol megveheted az autót.\");
PlayerChooseVehicle = true;
PlayerSwitchVehicle[playerid] = true;
ChoosedCar = 0;
SCM(playerid,-1,\"Use arrow left and right for choose car\");
SCM(playerid,-1,\"When you choose you car press \'ENTER\'\");
SCM(playerid,-1,\"If you want to exit type /stopbuying\");
TogglePlayerControllable(playerid,false);
DestroyVehicle(VehicleID);
VehicleID = AddStaticVehicleEx(CarModel[ChoosedCar][Model],COORDINATES,1,1,3600);
TextDrawShowForPlayer(playerid,CoSTD0[playerid]);
return 1;
}
YCMD:autovetelvege(playerid,params[],help)
{
#pragma unused params
#pragma unused help
if(!PlayerSwitchVehicle[playerid]) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem veheted meg az autót.\");
PlayerChooseVehicle = false;
PlayerSwitchVehicle[playerid] = false;
TogglePlayerControllable(playerid,true);
ChoosedCar = 0;
SCM(playerid,-1,\"Befejezted az autó választást.\");
TextDrawHideForPlayer(playerid,CoSTD0[playerid]);
return 1;
}
YCMD:v(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
new vehicleid = GetPlayerVehicleID(playerid);
        if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
if(strcmp(C_Data[vehicleid][Owner],GetName(playerid), false ) == 0)
        {
        ShowPlayerDialog(playerid,DIALOG_CARS+1,DIALOG_STYLE_LIST,\"Autókezelõ panel\",\"Szín\\nAutó zárás\\nAutó nyitás\\nEladás\\nParkolás\\nKeresés\\nRiasztó\",\"Csináld\",\"Mégse\");
}
return 1;
}
YCMD:gpski(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
if(!GPSOn[playerid]) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"A gps-ed ki van kapcsolva.\");
        DisablePlayerCheckpoint(playerid);
        GPSOn[playerid] = false;
return 1;
}
YCMD:cnerak(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
        new string[128],money;
        if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Autóban kell lenned!\");
        new id = GetPlayerVehicleID(playerid);
          if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
        if(Player[playerid][Veh3] == id || Player[playerid][Veh2] == id || Player[playerid][Veh1] == id)
        {
new Float:Pos[3]; GetVehiclePos(C_Data[id][iD],Pos[0],Pos[1],Pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem vagy az autód közelében.\");
if(sscanf(params, \"i\",money)) return SCM(playerid, COLOR_RED, \"Használat: /cberak [Összeg]\");
if(money > GetPlayerMoney(playerid)) return SCM(playerid, COLOR_RED, \"Nincsen ennyi pénzed\");
if(money < 1) return SCM(playerid, COLOR_RED, \"Az összegnek nagyobbnak kell lennie mint 1\");
        C_Data[id][Money] += money;
        GivePlayerMoney(playerid, -money);
format(string,sizeof(string),\"{E0BC1B}Beraktál %d$-t.Most van az autódban %d$\",money,C_Data[id][Money]);
        SCM(playerid,-1,string);
        CheckCar(id);
        }
return 1;
}
YCMD:ckivesz(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
        new string[128],money;
        if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Autóban kell lenned!\");
        new id = GetPlayerVehicleID(playerid);
          if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
        if(Player[playerid][Veh3] == id || Player[playerid][Veh2] == id || Player[playerid][Veh1] == id)
        {
new Float:Pos[3]; GetVehiclePos(C_Data[id][iD],Pos[0],Pos[1],Pos[2]);
if(sscanf(params, \"i\",money)) return SCM(playerid, COLOR_RED, \"Usage: /ckivesz [Összeg]\");
if(money > C_Data[id][Money]) return SCM(playerid, COLOR_RED, \"Nincsen ennyi pénz az autóban.\");
if(money < 1) return SCM(playerid, COLOR_RED, \"Az összegnek többnek kell lennie mint 1\");
        C_Data[id][Money] -= money;
        GivePlayerMoney(playerid, money);
format(string,sizeof(string),\"{E0BC1B}Kivettél %d$-t.Most van az autódban %d$\",money,C_Data[id][Money]);
        SCM(playerid,-1,string);
        CheckCar(id);
        }
return 1;
}
YCMD:cberakfegyver(playerid, params[], help)
{
        #pragma unused help
        new string[128];
         if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Az autódban kell lenned!\");
        new id = GetPlayerVehicleID(playerid);
          if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
        if(Player[playerid][Veh3] == id || Player[playerid][Veh2] == id || Player[playerid][Veh1] == id)
        {
new Float:Pos[3]; GetVehiclePos(id,Pos[0],Pos[1],Pos[2]);
        new slot,ammo;
if(sscanf(params, \"ii\",slot,ammo)) return SCM(playerid, COLOR_RED, \"Használat: /cberakfegyver [Hely: 1/2] [Töltény]\");
if(ammo > GetPlayerAmmo(playerid)) return SCM(playerid, COLOR_RED, \"Nincsen ennyi töltényed.\");
if(ammo < 1) return SCM(playerid, COLOR_RED, \"A tölténynek többnek kell lennie mint 1\");
if(slot == 1)
{
if(C_Data[id][Gun1] != 0) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Már van ezen a helyen fegyver.\");
        C_Data[id][Gun1] = GetPlayerWeapon(playerid);
        C_Data[id][Ammo1] = ammo;
        SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
format(string,sizeof(string),\"{E0BC1B}Fegyvert raktál be az 1-es slotra.%d tölténnyel.\",ammo);
        SCM(playerid,-1,string);
        CheckCar(id);
        }
if(slot == 2)
{
if(C_Data[id][Gun2] != 0) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Már van ezen a helyen fegyver.\");
        C_Data[id][Gun2] = GetPlayerWeapon(playerid);
        C_Data[id][Ammo2] = ammo;
        SetPlayerAmmo(playerid,GetPlayerWeapon(playerid),GetPlayerAmmo(playerid)-ammo);
format(string,sizeof(string),\"{E0BC1B}Fegyvert raktál be az 2-es slotra.%d tölténnyel.\",ammo);
        SCM(playerid,-1,string);
        CheckCar(id);
        }
        }
return 1;
}
YCMD:ckiveszfegyver(playerid, params[], help)
{
#pragma unused help
        new string[128];
         if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Nem vagy az autódban!\");
        new id = GetPlayerVehicleID(playerid);
          if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
        if(Player[playerid][Veh3] == id || Player[playerid][Veh2] == id || Player[playerid][Veh1] == id)
        {
new Float:Pos[3]; GetVehiclePos(id,Pos[0],Pos[1],Pos[2]);
        new slot,ammo;
if(sscanf(params, \"ii\",slot,ammo)) return SCM(playerid, COLOR_RED, \"Használat: /ckiveszfegyver [Hely: 1/2] [Töltény]\");
if(ammo < 1) return SCM(playerid, COLOR_RED, \"Ammo can\'t be less then 1\");
if(slot == 1)
{
if(C_Data[id][Gun1] != 0) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nincsen fegyver ezen a helyen.\");
if(ammo > C_Data[id][Ammo1]) return SCM(playerid, COLOR_RED, \"Hiba:\"COL_WHITE\" Az autóban nincsen ennyi töltény.\");
GivePlayerWeapon(playerid,C_Data[id][Gun1],ammo);
C_Data[id][Ammo1] -= ammo;
if(C_Data[id][Ammo1] == 0) {C_Data[id][Gun1] = 0;}
format(string,sizeof(string),\"{E0BC1B}Kivettél fegyvert az 1-es helyrõl.%d tölténnyel\",ammo);
        SCM(playerid,-1,string);
        CheckCar(id);
        }
if(slot == 2)
{
if(C_Data[id][Gun2] != 0) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nincsen fegyver ezen a helyen.\");
if(ammo > C_Data[id][Ammo2]) return SCM(playerid, COLOR_RED, \"Hiba:\"COL_WHITE\"Az autóban nincsen ennyi töltény.\");
GivePlayerWeapon(playerid,C_Data[id][Gun2],ammo);
C_Data[id][Ammo2] -= ammo;
if(C_Data[id][Ammo2] == 0) {C_Data[id][Gun2] = 0;}
format(string,sizeof(string),\"{E0BC2B}Kivettél fegyvert a 2-es helyrõl.%d tölténnyel\",ammo);
        SCM(playerid,-2,string);
        CheckCar(id);
        }
        }
return 1;
}
YCMD:eladauto(playerid, params[], help)
{
        #pragma unused help
        if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem vagy az autódban\");
new pplayerid,price;
if(sscanf(params,\"ui\",pplayerid,price)) return SCM(playerid,COLOR_RED,\"Használat: \"COL_WHITE\"/eladauto [iD/Név(részlet)] [Összeg]\");
if(GetPlayerMoney(pplayerid) < price) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Ennek a játékosnak nincsen ennyi pénze.\");
        if(price < 1) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Legalább 1$-ért add el.\");
new Float:Pos[3]; GetPlayerPos(pplayerid,Pos[0],Pos[1],Pos[2]);
if(!IsPlayerInRangeOfPoint(playerid,10.0,Pos[0],Pos[1],Pos[2])) return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nincsen a közeledben ez a játékos\");
          if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh1] == 9999) return SCM(playerid,COLOR_RED,\"Nincsen autód!\");
          if(Player[pplayerid][Veh3] != 9999 && Player[pplayerid][Veh2] != 9999 && Player[pplayerid][Veh1] != 9999) return SCM(playerid,COLOR_RED,\"A játékosnak már megvan a három autója!\");
        Seller[pplayerid] = playerid;
        Priceo[pplayerid] = price;
SendFormatMSG(pplayerid,-1,\" %s játékos eladná neked az autóját %d$-ért. Ha meg akarod venni írd be: /megveszem\",Priceo[playerid]);
SCM(playerid,-1,\"Várj a válaszra.\");
return 1;
}
YCMD:nemveszemmeg(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
        if(Seller[playerid] == 999)  return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem ajánlották fel, hogy eladnak neked egy autót.\");
SCM(playerid,-1,\"Visszautasítottad az ajánlatot.\");
SCM(Seller[playerid],-1,\"A játékos visszautasította az ajánlatot.\");
Priceo[playerid] = 0;
Seller[playerid] = 999;
return 1;
}
YCMD:megveszem(playerid, params[], help)
{
        #pragma unused help
        #pragma unused params
        new id = GetPlayerVehicleID(playerid);
        if(Seller[playerid] == 999)  return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"Nem ajánlották fel, hogy eladnak neked egy autót.\");
        if(!IsPlayerInAnyVehicle(Seller[playerid]))  return SCM(playerid,COLOR_RED,\"Hiba: \"COL_WHITE\"A játékos nincsen az autóban.\");
        if(Player[seller[playerid]][Veh3] == id)
        {
if(Player[playerid][Veh1] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999) {Player[playerid][Veh1] = Player[seller[playerid]][Veh3];}
else if(Player[playerid][Veh2] != 9999 && Player[playerid][Veh1] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh1] = Player[seller[playerid]][Veh3];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh3];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh3];}
else if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] != 9999){Player[playerid][Veh3] = Player[seller[playerid]][Veh3];}
strmid(C_Data[id][Owner], GetName(playerid), 0, strlen(GetName(playerid)), 999);
GivePlayerMoney(Seller[playerid],Priceo[playerid]);
GivePlayerMoney(playerid,-Priceo[playerid]);
SendFormatMSG(playerid,-1,\"Megvetted az autót %d$-ért\",Priceo[playerid]);
SendFormatMSG(Seller[playerid],-1,\"Eladtad az autót %d$-ért\",Priceo[playerid]);
CheckCar(id);
RemovePlayerFromVehicle(Seller[playerid]);
Priceo[playerid] = 0;
Seller[playerid] = 999;
}
        if(Player[seller[playerid]][Veh2] == id)
        {
if(Player[playerid][Veh1] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999) {Player[playerid][Veh1] = Player[seller[playerid]][Veh2];}
else if(Player[playerid][Veh2] != 9999 && Player[playerid][Veh1] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh1] = Player[seller[playerid]][Veh2];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh2];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh2];}
else if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] != 9999){Player[playerid][Veh3] = Player[seller[playerid]][Veh2];}
strmid(C_Data[id][Owner], GetName(playerid), 0, strlen(GetName(playerid)), 999);
GivePlayerMoney(Seller[playerid],Priceo[playerid]);
GivePlayerMoney(playerid,-Priceo[playerid]);
SendFormatMSG(playerid,-1,\"Megvetted az autót %d$-ért\",Priceo[playerid]);
SendFormatMSG(playerid,-1,\"Eladtad az autót %d$-ért\",Priceo[playerid]);
CheckCar(id);
RemovePlayerFromVehicle(Seller[playerid]);
Priceo[playerid] = 0;
Seller[playerid] = 999;
}
        if(Player[seller[playerid]][Veh1] == id)
        {
if(Player[playerid][Veh1] == 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999) {Player[playerid][Veh1] = Player[seller[playerid]][Veh1];}
else if(Player[playerid][Veh2] != 9999 && Player[playerid][Veh1] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh1] = Player[seller[playerid]][Veh1];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] != 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh1];}
else if(Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] == 9999 && Player[playerid][Veh3] == 9999){Player[playerid][Veh2] = Player[seller[playerid]][Veh1];}
else if(Player[playerid][Veh3] == 9999 && Player[playerid][Veh1] != 9999 && Player[playerid][Veh2] != 9999){Player[playerid][Veh3] = Player[seller[playerid]][Veh1];}
strmid(C_Data[id][Owner], GetName(playerid), 0, strlen(GetName(playerid)), 999);
GivePlayerMoney(Seller[playerid],Priceo[playerid]);
GivePlayerMoney(playerid,-Priceo[playerid]);
SendFormatMSG(playerid,-1,\"Megvetted az autót %d$-ért\",Priceo[playerid]);
SendFormatMSG(playerid,-1,\"Eladtad az autót %d$-ért\",Priceo[playerid]);
CheckCar(id);
RemovePlayerFromVehicle(Seller[playerid]);
Priceo[playerid] = 0;
Seller[playerid] = 999;
}
return 1;
}
//Stock
stock AddMoreCar(model,price,speed,level)
{
CarModel[maximalcars][Model] = model;
CarModel[maximalcars][Price] = price;
CarModel[maximalcars][speed] = speed;
CarModel[maximalcars][Level] = level;
maximalcars++;
}
stock CreateSaveCar(id)
{
new dFile[32];
format(dFile, 35, CoS_File, id);
  new
   INI:File = INI_Open(dFile);
          INI_WriteFloat(File, \"X\", C_Data[id][cX]);
          INI_WriteFloat(File, \"Y\", C_Data[id][cY]);
          INI_WriteFloat(File, \"Z\", C_Data[id][cZ]);
          INI_WriteFloat(File, \"A\", C_Data[id][cA]);
          INI_WriteInt(File, \"Model\", C_Data[id][Model]);
          INI_WriteInt(File, \"Lock\", C_Data[id][Lock]);
          INI_WriteString(File, \"Owner\", C_Data[id][Owner]);
          INI_WriteInt(File, \"Col1\", C_Data[id][Col1]);
          INI_WriteInt(File, \"Col2\", C_Data[id][Col2]);
          INI_WriteInt(File, \"Money\", C_Data[id][Col2]);
          INI_WriteInt(File, \"Gun1\", C_Data[id][Gun1]);
          INI_WriteInt(File, \"Ammo1\", C_Data[id][Ammo1]);
          INI_WriteInt(File, \"Gun2\", C_Data[id][Gun2]);
          INI_WriteInt(File, \"Ammo2\", C_Data[id][Ammo2]);
          INI_WriteInt(File, \"Alarm\", C_Data[id][Alarm]);
          INI_Close(File);
}
stock CheckCar(id)
{
new dFile[32];
format(dFile, 35, CoS_File, id);
  new
   INI:File = INI_Open(dFile);
          INI_WriteFloat(File, \"X\", C_Data[id][cX]);
          INI_WriteFloat(File, \"Y\", C_Data[id][cY]);
          INI_WriteFloat(File, \"Z\", C_Data[id][cZ]);
          INI_WriteFloat(File, \"A\", C_Data[id][cA]);
          INI_WriteInt(File, \"Model\", C_Data[id][Model]);
          INI_WriteInt(File, \"Lock\", C_Data[id][Lock]);
          INI_WriteString(File, \"Owner\", C_Data[id][Owner]);
          INI_WriteInt(File, \"Col1\", C_Data[id][Col1]);
          INI_WriteInt(File, \"Col2\", C_Data[id][Col2]);
          INI_WriteInt(File, \"Money\", C_Data[id][Col2]);
          INI_WriteInt(File, \"Gun1\", C_Data[id][Gun1]);
          INI_WriteInt(File, \"Ammo1\", C_Data[id][Ammo1]);
          INI_WriteInt(File, \"Gun2\", C_Data[id][Gun2]);
          INI_WriteInt(File, \"Ammo2\", C_Data[id][Ammo2]);
          INI_WriteInt(File, \"Alarm\", C_Data[id][Alarm]);
          INI_Close(File);
}
stock GetNextFreeID()
{
new string[32];
for(new i = NUMBER_FOR_LOAD; i <= MAX_CARS;i++)
{
format(string,32,CoS_File,i);
if(!fexist(string)) return i;
}
return 1;
}
stock GetVehiclePrice(model)
{
for(new id = 0; id <= maximalcars;id++)
{
if(CarModel[id][Model] == model) return CarModel[id][Price];
}
return 1;
}
stock UpdatePlayerInfo(playerid)
{
new
        pFile[35];
   format(pFile, 35, Player_File, GetName(playerid));
    new
    INI:UserFile = INI_Open(pFile);
    INI_WriteInt(UserFile, \"Veh1\", Player[playerid][Veh1]);
    INI_WriteInt(UserFile, \"Veh2\", Player[playerid][Veh2]);
    INI_WriteInt(UserFile, \"Veh3\", Player[playerid][Veh3]);
    INI_Close(UserFile);
}
stock ProxDetector(playerid, const msg [], color, maxdistance = 50)
{
    new
        Float: x1,
        Float: y1,
        Float: z1,
        distance,
        string [128];
    if (GetPlayerName (playerid, string, sizeof string))
    {
        format (string, sizeof string, \"%s\", msg);
        GetPlayerPos (playerid, x1, y1, z1);
        for (new i = 0; i < MAX_PLAYERS; ++i)
        {
            if (IsPlayerConnected (i) && !IsPlayerNPC (i))
            {
                if (i == playerid)
                    SCM (i, color, string);
                else
                {
                    distance = floatround (GetPlayerDistanceFromPoint (i, x1, y1, z1));
                    if (distance <= maxdistance)
                        SCM (i, ColorFade (color, distance, maxdistance), string);
                }
            }
        }
        return 1;
    }
    return 0;
}
stock ColorFade (color, value, maxvalue)
{
    if (0 <= value <= maxvalue)
    {
        new
            Float: ratio = float (value) / float (maxvalue);
        new
            r = max (0, min (255, floatround (float ((color >> 24) & 0xFF) * ratio))),
            g = max (0, min (255, floatround (float ((color >> 16) & 0xFF) * ratio))),
            b = max (0, min (255, floatround (float ((color >> 8) & 0xFF) * ratio)));
        return (r << 24) | (g << 16) | (b << 8) | (value & 0xFF);
    }
    return 0;
}
//public function
forward LoadCar(id, name[], value[]);
public LoadCar(id, name[], value[])
{
    INI_Float(\"X\", C_Data[id][cX]);
    INI_Float(\"Y\", C_Data[id][cY]);
    INI_Float(\"Z\", C_Data[id][cZ]);
    INI_Float(\"A\", C_Data[id][cA]);
    INI_Int(\"Model\", C_Data[id][Model]);
    INI_Int(\"Lock\", C_Data[id][Lock]);
    INI_String(\"Owner\", C_Data[id][Owner],32);
    INI_Int(\"Col1\", C_Data[id][Col1]);
    INI_Int(\"Col2\", C_Data[id][Col2]);
    INI_Int(\"Money\", C_Data[id][Money]);
INI_Int(\"Gun1\", C_Data[id][Gun1]);
INI_Int(\"Ammo1\", C_Data[id][Ammo1]);
INI_Int(\"Gun2\", C_Data[id][Gun2]);
INI_Int(\"Ammo2\", C_Data[id][Ammo2]);
INI_Int(\"Alarm\", C_Data[id][Alarm]);
    return 1;
}

1288
Paradise RolePlay / Általános Társalgó (Ex-Kérdõív)
« Dátum: 2012. május 05. - 18:14:13 »
Igen, igazad van. Van olyan személyiség aki nem alig él közösségi életet. Ha ezt nézzük akkor, ha úgy alakítod a karaktered, hogy zárkózott személyiségû, aki nem él közösségi életet + munkamániás, akkor nincs vele semmi baj.

1289
Paradise RolePlay / Általános Társalgó (Ex-Kérdõív)
« Dátum: 2012. május 05. - 18:08:45 »
Igen. Szerintem sem túl jó ötlet az, hogy egész nap dolgozol.
Van egy ötletem. Mi lenne, ha a karaktertörténeteket IG is meg lehetne megírni. És azt mentené egy fájlba. Amit meg lehetne nézni. Szerintem tök jó lenne. Meg a karakterlapokat is.
(Az is-t kiemeltem. A fórumon is lehessen azért.)

1290
Szép! Ment egy +

Oldalak: 1 ... 84 85 [86] 87 88 ... 92
SimplePortal 2.3.7 © 2008-2024, SimplePortal