Ezt a pawno kódot tedd ki a téma leírásba: //include-ok
#include <a_samp>
#include <zcmd>
#include <streamer>
#include <dini>
//színek
#define COLOR_BLUE 0x0000FFAA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xf7ff00AA
#define COLOR_BLACK 0x000000AA
#define COLOR_GRAY 0x616159AA
#define COLOR_GREEN 0x00ff11AA
#define COLOR_PINK 0xcc00ffAA
#define COLOR_LIGHTBLUE 0x0088ffAA
#define RED 0xff0000AA
#define ORANGE 0xff8c00AA
#define JOGSI_AR 5000
#define JOGSI_POS 2200.8530,1389.1033,10.8203
#define VIZSGAKOCSI_POS 2233.8877,1398.0369,10.8203
#define VIZSGA_MINUTE 59 // Az az 1 Perc
#define VIZSGA_SEC 30 // 30 Másodpec
new
vizsgakocsi,
Text3D:vizsgakocsitext,
bool:vizsgazik[MAX_PLAYERS],
CP[MAX_PLAYERS] = -1,
str[128],
file[64],
pname[MAX_PLAYER_NAME],
VizsgaMinute[MAX_PLAYERS] = VIZSGA_MINUTE,
VizsgaSec[MAX_PLAYERS] = VIZSGA_SEC,
vizsgatimer[MAX_PLAYERS];
forward VizsgaTime(playerid);
//100 feletti ping...
forward OnPlayerLaggol(playerid);
main()
{
print(\"\\n................................\");
print(\" Kézdivásárhelyi RPG Fut!\\n\");
print(\" Készítette: Okos_Erik\\n\");
print(\"................................\\n\");
}
//skin választó
public OnPlayerRequestClass(playerid)
{
ApplyAnimation(playerid, \"ON_LOOKERS\", \"wave_loop\", 4.0, 1, 0, 0, 0, 0); // Wave
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-384.3259,2394.8289,37.8055);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,-382.2751,2390.4070,36.9519);
SetPlayerCameraLookAt(playerid,-384.3259,2394.8289,37.8055);
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(vehicleid == vizsgakocsi)
{
if(vizsgazik[playerid] == true)
{
DisablePlayerCheckpoint(playerid);
CP[playerid] = 0;
SetPlayerCheckpoint(playerid,2245.0698,1385.7650,10.7179,3.0);
vizsgatimer[playerid] = SetTimerEx(\"VizsgaTime\",1000,true,\"i\",playerid);
}
else RemovePlayerFromVehicle(playerid),SendClientMessage(playerid,RED,\"Nem fizetted ki a tanfolyamot ezért nem vizsgázhatsz!\");
}
}
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(vehicleid == vizsgakocsi)
{
if(vizsgazik[playerid] == true)
{
SendClientMessage(playerid,RED,\"Kiszálltál a kocsiból ezért megbuktál!\");
DisablePlayerCheckpoint(playerid);
SetVehicleToRespawn(vizsgakocsi);
vizsgazik[playerid] = false;
KillTimer(vizsgatimer[playerid]);
vizsgatimer[playerid] = -1;
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
switch(CP[playerid])
{
case 0:
{
SetPlayerCheckpoint(playerid,2306.9607,1380.2651,10.7908,3.0);
CP[playerid]++;
}
case 1:
{
SetPlayerCheckpoint(playerid,2260.4417,1480.1423,15.7490,3.0);
CP[playerid]++;
SendClientMessage(playerid,ORANGE,\"[OKTATÓ] Parkolj be!\");
}
case 2:
{
SetPlayerCheckpoint(playerid,2250.1218,1380.7107,10.7720,3.0);
CP[playerid]++;
}
case 3:
{
SetPlayerCheckpoint(playerid,2233.2866,1427.6865,10.8203,3.0);
CP[playerid]++;
}
case 4:
{
SetPlayerCheckpoint(playerid,2165.9568,1414.7357,10.8203,3.0);
CP[playerid]++;
}
case 5:
{
SetPlayerCheckpoint(playerid,2187.9734,1421.3657,10.8203,3.0);
SendClientMessage(playerid,ORANGE,\"[OKTATÓ] Tolass be!\");
CP[playerid]++;
}
case 6:
{
SetPlayerCheckpoint(playerid,2091.0317,1404.5146,10.8203,3.0);
CP[playerid]++;
}
case 7:
{
SetPlayerCheckpoint(playerid,2106.4063,1381.2911,10.7356,3.0);
CP[playerid]++;
}
case 8:
{
SetPlayerCheckpoint(playerid,2079.0679,1375.1686,10.6639,3.0);
CP[playerid]++;
}
case 9:
{
SetPlayerCheckpoint(playerid,2028.4353,1351.5546,10.8203,3.0);
CP[playerid]++;
}
case 10:
{
SetPlayerCheckpoint(playerid,2015.7626,1356.3845,9.4967,3.0);
CP[playerid]++;
}
case 11:
{
SetPlayerCheckpoint(playerid,2008.6814,1368.9521,9.2501,3.0);
CP[playerid]++;
}
case 12:
{
SetPlayerCheckpoint(playerid,1962.9766,1365.2643,9.2501,3.0);
CP[playerid]++;
}
case 13:
{
SetPlayerCheckpoint(playerid,1963.6858,1319.5132,9.2501,3.0);
CP[playerid]++;
}
case 14:
{
SetPlayerCheckpoint(playerid,2014.7059,1319.1608,9.2578,3.0);
CP[playerid]++;
}
case 15:
{
SetPlayerCheckpoint(playerid,2019.3538,1334.4059,9.8770,3.0);
CP[playerid]++;
}
case 16:
{
SetPlayerCheckpoint(playerid,2188.5935,1386.8868,10.8203,3.0);
CP[playerid]++;
}
case 17:
{
SetPlayerCheckpoint(playerid,2243.6731,1392.2461,10.8507,3.0);
CP[playerid]++;
}
case 18:
{
SetPlayerCheckpoint(playerid,2234.8948,1420.7866,10.8203,3.0);
CP[playerid]++;
}
case 19:
{
new Float:VHealth;
GetVehicleHealth(GetPlayerVehicleID(playerid),VHealth);
if(VHealth >= 998)
{
new year,month,day,hour,minute,sec;
getdate(year,month,day);
gettime(hour,minute,sec);
SendClientMessage(playerid,ORANGE,\"Sikeresen Átmentél a vizsgán!\");
CP[playerid] = -1;
DisablePlayerCheckpoint(playerid);
format(file,sizeof(file),\"Jogositvanyok/%s.ini\",pName(playerid));
vizsgazik[playerid] = false;
SetVehicleToRespawn(vizsgakocsi);
KillTimer(vizsgatimer[playerid]);
vizsgatimer[playerid] = -1;
if(!fexist(file)){
dini_Create(file);
format(str,sizeof(str),\"%d,%02d,%02d %02d:%02d:%02d\",year,month,day,hour,minute,sec);
dini_Set(file,\"Név\",pName(playerid));
dini_Set(file,\"Megkapta\",str);
}
}
else
{
SendClientMessage(playerid,RED,\"Megbuktál!\");
CP[playerid] = -1;
vizsgazik[playerid] = false;
SetVehicleToRespawn(vizsgakocsi);
DisablePlayerCheckpoint(playerid);
KillTimer(vizsgatimer[playerid]);
vizsgatimer[playerid] = -1;
}
}
}
return 1;
}
CMD:jogsivesz(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid,8.0,JOGSI_POS)) return SendClientMessage(playerid,RED,\"Itt nem vehetsz jogosítványt! LV ben az Auto Bahnnál vásárolhatsz!\");
if(GetPlayerMoney(playerid) < JOGSI_AR) return SendClientMessage(playerid,RED,\"Nincs elég pénzed!\");
format(file,sizeof(file),\"Jogositvanyok/%s.ini\",pName(playerid));
if(fexist(file)) return SendClientMessage(playerid,RED,\"Neked már van jogosítványod!\");
if(vizsgazik[playerid] == true) return SendClientMessage(playerid,RED,\"Te már vizsgázol!\");
SendClientMessage(playerid,ORANGE,\"Kifizetted a tanfolyamot. Most menj a vizsga kocsihoz!\");
SetPlayerCheckpoint(playerid,VIZSGAKOCSI_POS,4.0);
GivePlayerMoney(playerid, - JOGSI_AR);
vizsgazik[playerid] = true;
return 1;
}
public VizsgaTime(playerid)
{
if(VizsgaMinute[playerid] == 0)
{
VizsgaMinute[playerid] = 0;
VizsgaSec[playerid] = 0;
vizsgazik[playerid] = false;
DisablePlayerCheckpoint(playerid);
SetVehicleToRespawn(vizsgakocsi);
KillTimer(vizsgatimer[playerid]);
vizsgatimer[playerid] = -1;
SendClientMessage(playerid,RED,\"Lejárt az idõd megbuktál!\");
return 1;
}
if(VizsgaSec[playerid] != 0)
{
VizsgaSec[playerid]--;
format(str,sizeof(str),\"~g~01:%02d\",VizsgaSec[playerid]);
GameTextForPlayer(playerid,str,1000,4);
}
else
{
VizsgaMinute[playerid]--;
format(str,sizeof(str),\"~g~00:%02d\",VizsgaMinute[playerid]);
GameTextForPlayer(playerid,str,1000,4);
}
return 1;
}
pName(playerid)
{
GetPlayerName(playerid,pname,sizeof(pname));
return pname;
}
public OnGameModeInit()
{
vizsgakocsitext = Create3DTextLabel(\"Vizsga Kocsi\",0xff0000AA,0,0,0,50.0,0,0);
vizsgakocsi = CreateVehicle(565,VIZSGAKOCSI_POS,178.7419,6,6,-1);
Attach3DTextLabelToVehicle(vizsgakocsitext,vizsgakocsi,0,0,2.0);
SetGameModeText(\"[HUN]Kézdivásárhelyi RPG\");
ShowPlayerMarkers(0);
ShowNameTags(1);
UsePlayerPedAnims();
//skinék
AddPlayerClass(162,1938.6619,168.0561,37.2752,345.2966,0,0,0,0,0,0); //
AddPlayerClass(199,1938.6619,168.0561,37.2752,345.2966,0,0,0,0,0,0); //
AddPlayerClass(197,1938.6619,168.0561,37.2752,345.2966,0,0,0,0,0,0); //
AddPlayerClass(132,1938.6619,168.0561,37.2752,345.2966,0,0,0,0,0,0); //
AddPlayerClass(128,1938.6619,168.0561,37.2752,345.2966,0,0,0,0,0,0); //
return 1;
}
public OnGameModeExit()
{
return 1;
}
//csatlakozik a player
public OnPlayerConnect(playerid)
{
new plname[128];
GetPlayerName(playerid, plname, sizeof(plname));
new namestring = strfind(plname, \"_\", true);
if(namestring == -1)
{
SendClientMessage(playerid, COLOR_RED, \"RP szerver, valósághubb nevet írj be, ami lehet saját vagy kitalált!\");
SendClientMessage(playerid, COLOR_BLUE, \"Így kell kinéznie: Vezetéknév_Keresztnév pl: Proba_Peter\");
Kick(playerid);
return 1;
}
SendClientMessage(playerid,COLOR_LIGHTBLUE,\"Üdv Kézdivásárhelyen!\");
SendClientMessage(playerid,COLOR_LIGHTBLUE,\"Ha szerted az RPG szerókat játsz ezen!!!\");
SendClientMessage(playerid,COLOR_PINK,\"A szerver betöltve!!\");
SendClientMessage(playerid,COLOR_YELLOW,\"Admin TGF:OFF!\");
SendClientMessage(playerid,COLOR_RED,\"Infóért: /help!\");
SendClientMessage(playerid,COLOR_LIGHTBLUE,\"A Gamemóde készítõje: Okos_Erik!\");
GivePlayerMoney(playerid, 0);
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"{FFFFFF}%s feljött a {33FF00}Kézdi-i {FFFFFF}szerverre.\", pName);
SendClientMessageToAll(0x33AA33AA,string);
return 1;
}
CMD:help(playerid, paramsp[]){
SendClientMessage(playerid, 0x33AA33AA, \"{6EF83C}===========Parancsok /help=====================\");
SendClientMessage(playerid, 0xFFFFFFAA, \"{6EF83C}Munkák:/uttisztitio\");
SendClientMessage(playerid, 0xFFFFFFAA, \"{6EF83C}Parancsok:/rendszam\");
SendClientMessage(playerid, 0xFFFFFFAA, \"{FFA1A1}Még lesznek parancsok nyugi!\");
SendClientMessage(playerid, 0x33AA33AA, \"============================================\");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pName[30], string[128];
GetPlayerName(playerid, pName, 30);
format(string, 256, \"{FFFFFF}%s lelépett a {33FF00}Kézdi-i {FFFFFF}szerverrõl.\", pName);
SendClientMessageToAll(0xA52A2AAA,string);
return 1;
}
//spawnol a player
public OnPlayerSpawn(playerid)
{
TogglePlayerClock(playerid, 0);
SetPlayerTime(playerid, 12,0);
SetPlayerWeather(playerid, 0);
SetPlayerPos(playerid, 2286.7939,83.2971,26.4844);
return 1;
}
//megdöglik a player
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid,COLOR_GREEN,\"Meghaltál!!\");
return 1;
}
//öngyilkosság /kill
CMD:kill(playerid,params[])
{
SetPlayerHealth(playerid,0);
}
// 100 feletti ping esetén
public OnPlayerLaggol(playerid)
{
if(GetPlayerPing(playerid) > 100)
{
SendClientMessage(playerid, COLOR_RED, \"\\n.............................\\n\");
SendClientMessage(playerid, COLOR_RED, \"Nagy volt a pinged ezért kibaszott a szerver!!\");
SendClientMessage(playerid, COLOR_RED, \"\\n.............................\");
}
return 1;
}
szntem inkább törölje!!! [/quote]
Mért is törölje??? Majd eldönti ö vagy egy moderátor!!
Jah, és légyszíves helyes írásokra figyelj!!