ha modomba berakom, ki irja már egyszer használatban van public OnPlayerConnect(playerid) stb..
ezért itt van, ahogy a modba alapbol bevan irva, sajnálom kezdő vagyok nincs honnét tudjam, hogy oldjam meg. Ha kitörlöm ezeket, akkor kifagy a pawno.
[jónak néz ki csak nem müködik ]
public OnPlayerConnect(playerid)
{
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
SetPlayerToTeamColor(playerid);
TogglePlayerControllable(playerid, 0); //fagyasztás
SetTimerEx(\"OL\",830,0,\"i\",playerid); //OL Timer
GameTextForPlayer(playerid, \"~y~Objectek~n~~b~Betöltése~r~....\", 12000, 6); //Amit kiír egy GameTextbe
return 1;
}
//OL függvény amit az elobb forwardoltunk
public OL(playerid)
{
TogglePlayerControllable(playerid,1); //Leveszi a fagyasztást
GameTextForPlayer(playerid, \"~r~Objectek~g~~n~Betöltve!\", 3000, 6); //Amit kiír ha indulhatsz
PlayerPlaySound(playerid,1058);
//SetPlayerColor(playerid,COLOR_GRAD2);
InitLockDoors(playerid);
STDPlayer[playerid] = 0;
/*gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}*/
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, \"Jelentkezz be mielőtt játszanál!\");
KickPlayer[playerid] = 1;
}
if(gTeam[playerid] == 3)
{
if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
{
//SendClientMessage(playerid, COLOR_LIGHTRED, \"You are part of a Family/Force, you\'ve been forced to the right Class + Char !\");
MedicBill[playerid] = 0;
new model = PlayerInfo[playerid][Munkaruha1];
if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
//else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 14) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 15) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 16) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pMember] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][szervLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
//else if(PlayerInfo[playerid][pLeader] == 14) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
//else if(PlayerInfo[playerid][pLeader] == 15) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 16) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 17) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
else if(PlayerInfo[playerid][pLeader] == 18) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
Nevekki(playerid);
SpawnPlayer(playerid);
}
}
if(PlayerInfo[playerid][Munkaruha1] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][Munkaruha1]); }
else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
SetPlayerWeapons(playerid);
SetPlayerSpawn(playerid);
SetPlayerToTeamColor(playerid);
PlayerFixRadio(playerid);
for(new i = 0; i < sizeof(Turfs); i++)
{
GangZoneShowForPlayer(playerid, i, TurfInfo[zColor]);
//GangZoneShowForPlayer(playerid, surenos, 0x4C5386AA);
//GangZoneShowForPlayer(playerid, black_yakuza, 0x000000C2);
//GangZoneShowForPlayer(playerid, nortenos, 0x9D000096);
//GangZoneShowForPlayer(playerid, street_zone, 0x33AA33AA);
//GangZoneShowForPlayer(playerid, jefferson_saints, 0xD900D3C8);
return 1;
}
if(MapIconsShown[playerid] != 1)
{
MapIconsShown[playerid] = 1;
for(new i = 0; i < sizeof(BizzInfo); i++)
{
SetPlayerMapIcon(playerid,i + 1,BizzInfo[bEntranceX],BizzInfo[bEntranceY],BizzInfo[bEntranceZ],36,COLOR_LIGHTRED);
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
SetPlayerMapIcon(playerid,i + 20,SBizzInfo[sbEntranceX],SBizzInfo[sbEntranceY],SBizzInfo[sbEntranceZ],36,COLOR_LIGHTRED);
}
}
return 1;
}
public CKLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/ck.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public PayLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/pay.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public KickLog(string[])
{
new entry[256];
format(entry, sizeof(entry), \"%s\\r\\n\",string);
new File:hFile;
hFile = fopen(\"logs/kick.log\", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(Rabol[playerid] != 0)
Rabol[playerid] = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
new sendername[32];
new planame[MAX_PLAYER_NAME];
GetPlayerName(playerid, planame, sizeof(planame));
GetPlayerName(killerid, sendername, sizeof(sendername));
format(stringx, sizeof(stringx), \"%s megölte %s.\", sendername, rag(planame,3));
if(Admin(i, 1)) SendClientMessage(i, COLOR_GRAD1, stringx);
if(playerid != killerid) rk[killerid][playerid] = 601;
Fegyverelol[playerid] = 0;
if(PlayerInfo[playerid][biztositas] == 0)
{
PlayerInfo[playerid][Korhazban] = 1;
}
if(PlayerInfo[playerid][biztositas] == 1)
{
PlayerInfo[playerid][Korhazban] = 0;
PlayerInfo[playerid][Penz] += 10000;
SafeGivePlayerMoney(playerid, 10000);
format(stringx, sizeof(stringx), \"Mivel van életbiztosításod így kaptál 10000Ft-t!\");
SendClientMessage(playerid, COLOR_WHITE, stringx);
varoskassza -= -1000;
Savevaroskassza();
new nev[32];
GetPlayerName(playerid, nev, sizeof(nev));
new h,mi,s,y,m,d;
getdate(y,m,d);
gettime(h,mi,s);
format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d][biztosítás] %s biztosítás által kapott 10000Ft-t.\",y,m,d,h,mi,s,nev);
LoOoG(stringx);
}
SafeResetPlayerWeapons(playerid);
ResetPlayerWeapons(playerid);
PlayerInfo[playerid][Animban] = 0;
gyogyulas[playerid] = 0;
PlayerInfo[playerid][eseg] = 100;
PlayerInfo[playerid][szomjas] = 100;
PlayerInfo[playerid][szukseg] = 100;
}
new name[MAX_PLAYER_NAME];
new string[256];
//new dmessage[128];
//new deathreason[20];
new playercash;
new victimteam;
new Float:px,Float:py,Float:pz;
new killerteam;
victimteam = gTeam[playerid];
killerteam = gTeam[killerid];
gPlayerSpawned[playerid] = 0;
PlayerInfo[playerid][pInvWeapon] = 0;
PlayerInfo[playerid][pInvAmmo] = 0;
GetPlayerName(playerid, name, sizeof(name));
PlayerInfo[playerid][pLocal] = 255;
GetPlayerPos(playerid, px, py, pz);
if(killerid != 255)
{
if(GetPlayerState(killerid) == 2)
{
if(ProxDetectorS(20, killerid, playerid))
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[killerid][pMember] == 1||PlayerInfo[killerid][pLeader] == 1||PlayerInfo[killerid][pMember] == 2||PlayerInfo[killerid][pLeader] ==2)
{
SendClientMessage(killerid, COLOR_YELLOW, \"Az autóval való gyilkolás súlyos büntetést von maga után!\");
return 1;
}
//SetPlayerCriminal(killerid,255,\"Manslaughter\");
//SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
return 1;
}
}
}
}
if (!Admin(killerid, 1))
{
if(reason == 38)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte [%d]%s minigunnal.\",killerid,kickname,playerid,name);
ABroadCast(COLOR_RED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 35)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte lángszóróval.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 9)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte láncfűrésszel.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 16)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte gránáttal.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 18)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte molotov koktéllal.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 28)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte MAC 10-essel.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 32)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s Megölte TEC 9-el.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
if(reason == 36)
{
new kstring[128];
new kickname[MAX_PLAYER_NAME];
if(IsPlayerConnected(killerid))
{
GetPlayerName(killerid, kickname, sizeof(kickname));
format(string, 256, \"[!!FIGYELMEZTETÉS!!] [%d]%s megölte rakétavetővel.\",killerid,kickname);
ABroadCast(COLOR_LIGHTRED,string,1);
printf(\"%s\", kstring);
}
}
}
if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
{
DisablePlayerCheckpoint(playerid);
gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
}
new caller = Mobile[playerid];
if(caller != 255)
{
if(caller < 255)
{
SendClientMessage(caller, COLOR_WHITE, \"Megszakadt a vonal....\");
CellTime[caller] = 0;
CellTime[playerid] = 0;
Mobile[caller] = 255;
}
Mobile[playerid] = 255;
CellTime[playerid] = 0;
}
ClearCrime(playerid);
if(PlayerPaintballing[playerid] != 0)
{
PlayerPaintballKills[killerid] ++;
if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
{
new killer[MAX_PLAYER_NAME];
PaintballWinner = killerid;
PaintballWinnerKills = PlayerPaintballKills[killerid];
GetPlayerName(killerid, killer, sizeof(killer));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing != 0)
{
format(string, sizeof(string), \"* %s is in the lead with %d Kills.\",killer,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
}
return 1;
}