Főoldal
Fórum
Bejelentkezés
Regisztráció
Friss hírek
Információ
GTA Közösség – Megszokott arculattal.
Keresés a fórumon
GTA Közösség - A magyar GTA fórum
»
San Andreas Multiplayer (SA-MP)
»
SA-MP: Szerverfejlesztés
»
Szkript kérések
»
Admin spec javítása
« előző
következő »
Nyomtatás
Oldalak: [
1
]
Le
Szerző
Téma: Admin spec javítása (Megtekintve 1184 alkalommal)
sz18k
87
Admin spec javítása
«
Dátum:
2011. augusztus 14. - 09:27:10 »
0
Voters list:
Van egy adminspecem, de az a baj, hogy ha valaki kiszáll vagy beszáll a kocsiba, akkor átugrik arra a játékosra. Kérlek segítsetek, fontos lenne.
[pawn] if (strcmp(cmd, \"/spec\", true) == 0) // Moddded By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, \"Használat: /spec [iD/Név]\");
return 1;
}
giveplayerid = ReturnUser(tmp);
new Float:Health, Float:Armour;
new World = GetPlayerVirtualWorld(playerid);
new PlInterior = GetPlayerInterior(playerid);
new weaponid, ammo;
GetPlayerHealth(playerid, Health);
GetPlayerArmour(playerid, Armour);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(Spectate[playerid] == 255)
{
GetPlayerPos(playerid, TeleportDest[playerid][0],TeleportDest[playerid][1],TeleportDest[playerid][2]);
if(PlayerInfo[playerid][pAdmin] >= 6)
{
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
for (new i=0; i<13; i++)
{
GetPlayerWeaponData(playerid, i, weaponid, ammo);
OtherWeapons[playerid]
= weaponid;
OtherAmmo[playerid]
= ammo;
}
SpHealth[playerid] = Health;
SpArmour[playerid] = Armour;
}
else
{
SaveGuns(playerid);
PlayerInfo[playerid][pHealth] = Health;
PlayerInfo[playerid][pArmour] = Armour;
}
}
else
{
SaveGuns(playerid);
PlayerInfo[playerid][pHealth] = Health;
PlayerInfo[playerid][pArmour] = Armour;
}
}
Interior[playerid] = PlInterior;
VirWorld[playerid] = World;
TogglePlayerSpectating(playerid, 1);
if(IsPlayerInAnyVehicle(giveplayerid)) { PlayerSpectateVehicle(playerid, GetPlayerVehicleID(giveplayerid)); }
else { PlayerSpectatePlayer(playerid, giveplayerid); }
Spectate[playerid] = giveplayerid;
SafeSetPlayerInterior(playerid, GetPlayerInterior(giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), \": %s most õt figyeli: %s (%d).\", sendername, giveplayer, giveplayerid);
SendAdminMessage(COLOR_LIGHTRED,string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"* Ezt a játékost figyeled. Hogy bejfejezd, írd: /endspec <ID>\");
TextDrawHideForPlayer(playerid, Textdraw44);
TextDrawHideForPlayer(playerid, Textdraw45);
TextDrawHideForPlayer(playerid, Textdraw55);
TextDrawHideForPlayer(playerid, Textdraw51[playerid]);
TextDrawShowForPlayer(playerid, Textdraw54[playerid]);
if(PlayerInfo[playerid][pWatch] == 1)
{
TextDrawHideForPlayer(playerid, Textdraw56);
TextDrawHideForPlayer(playerid, Textdraw57);
TextDrawHideForPlayer(playerid, Textdraw58);
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), \"(%d/%d/%d)[%d:%d:%d] %s figyeli õt: %s\'s\",d,m,y,h,mi,s,sendername,giveplayer);
AdminLog(string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \" Nincs ilyen játékos\");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \" Nem vagy admin\");
}
}
return 1;
}
if (strcmp(cmd, \"/endspec\", true) == 0) // Moddded By CuervO_NegrO
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, \"Használat: /endspec [iD/Név]\");
return 1;
}
//giveplayerid = strval(tmp);
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
TogglePlayerSpectating(playerid, 0);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), \": %s már nem figyeli õt: %s (%d).\", sendername, giveplayer, giveplayerid);
SendAdminMessage(COLOR_LIGHTRED,string);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), \"(%d/%d/%d)[%d:%d:%d] %s õt figyeli: %s\'s\",d,m,y,h,mi,s,sendername,giveplayer);
AdminLog(string);
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \" Nincs ilyen játékos\");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, \" Nem vagy admin\");
}
}
return 1;
}
[/pawn]
ez pedig az amit kiír a játékosra ha specelem:
[pawn]public Spectator()
{
new string[350];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Spectate
!= 255)
{
new targetid = Spectate
;
if(IsPlayerConnected(targetid))
{
if(PlayerInfo
[pAdmin] >= 1)
{
new Float:health,Float:armour,Float:health2;
new name[MAX_PLAYER_NAME];
new money = GetPlayerMoney(targetid);
new carid = GetPlayerVehicleID(targetid);
new kmh = GetPlayerSpeed(targetid, true);
new bankmoney = PlayerInfo[targetid][pAccount];
GetPlayerName(targetid, name, sizeof(name));
GetPlayerHealth(targetid, health);
GetPlayerArmour(targetid, armour);
GetVehicleHealth(carid, health2);
if(!IsPlayerInAnyVehicle(targetid))
{
format(string, sizeof(string),\"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Élet: ~w~%.1f ~g~:-: ~b~Páncél: ~w~%.1f ~n~ ~b~Pénz: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d\",name,targetid,health,armour,money,bankmoney);
TextDrawSetString(Textdraw54
,string);
}
else
{
format(string, sizeof(string),\"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Élet: ~w~%.1f ~g~:-: ~b~Páncél: ~w~%.1f ~n~ ~b~Pénz: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d ~n~~n~~g~---------------------------------------------------~n~~n~ ~b~Jármû ID: ~w~%d ~b~Jármû HP: ~w~%.1f\",name,targetid,health,armour,money,bankmoney,carid,health2,kmh);
TextDrawSetString(Textdraw54
,string);
}
}
if(GetPlayerInterior(targetid) > 0)
{
SafeSetPlayerInterior(i,GetPlayerInterior(targetid));
}
if(GetPlayerVirtualWorld(targetid) > 0)
{
SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(targetid));
}
}//Targetid connected
}
}
}
}
[/pawn]
Naplózva
Light557
836
_@_/
Admin spec javítása
«
Válasz #1 Dátum:
2011. augusztus 14. - 09:38:54 »
0
Voters list:
OnPlayerStateChange callback alatt is kell lennie kódnak.
Azt is másold be kérlek.
«
Utoljára szerkesztve: 2011. augusztus 14. - 10:03:24 írta Light
»
Naplózva
sz18k
87
Admin spec javítása
«
Válasz #2 Dátum:
2011. augusztus 14. - 10:48:10 »
0
Voters list:
Tessék:
[pawn]public OnPlayerStateChange(playerid, newstate, oldstate)
{
new string[128];
new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
new vehicle = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && (pveh != 509 && pveh != 481 && pveh != 510) && IsPlayerInAnyVehicle(playerid) && !IsAHarvest(vehicle) && !IsADrugHarvest(vehicle) && !IsASweeper(vehicle))
{
SetTimerEx(\"Startup\", 1, false, \"ii\", playerid, vehicle);
SetTimerEx(\"engine2\", 2500, false, \"i\", playerid);
}
else if(newstate == PLAYER_STATE_DRIVER && (pveh != 509 && pveh != 481 && pveh != 510) && IsPlayerInAnyVehicle(playerid) && !IsAHarvest(vehicle) && !IsADrugHarvest(vehicle) && !IsASweeper(vehicle))
{
SetTimerEx(\"Startup\", 1, false, \"ii\", playerid, vehicle);
SetTimerEx(\"engine2\", 2500, false, \"i\", playerid);
}
if(newstate == PLAYER_STATE_DRIVER && (pveh == 420 || pveh == 438))
{
SetRealMoney(playerid, ScriptMoney[playerid]);
}
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
if(Decoding[playerid] == 1)
{
Decoding[playerid] = 0;
KillTimer(DecoderTimer);
HideDecoder(playerid);
SendClientMessage(playerid, COLOR_NICERED, \"Elhagytad az autót, dekóder megállt!\");
decodecode = 0;
Decoder = 0;
}
ScriptWeaponsUpdated[playerid] = 1;
SetTimerEx(\"UpdateWeapons\",2000,false,\"i\",playerid);
}
if(newstate == PLAYER_STATE_ONFOOT)
{
TogglePlayerControllable(playerid, 1);
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"ADMINSZOLGÁLAT \\n Megtámadni tilos\",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
else if(PlayerInfo[playerid][pTesterDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"TESZTERSZOLGÁLAT \\n Megtámadni tilos\",0x00AA0099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
if(TransportDuty[playerid] > 0)
{
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
TransportDuty[playerid] = 0;
format(string, sizeof(string), \"* Most már szolgálaton kívül vagy és kerestél $%d-t.\", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(playerid, TransportMoney[playerid]);
/*ConsumingMoney[playerid] = 1;*/
TransportValue[playerid] = 0;
TransportMoney[playerid] = 0;
SetPlayerToTeamColor(playerid);
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), \"~w~A fuvar ára:~n~~r~$%d\",TransportCost[playerid]);
GameTextForPlayer(playerid, string, 5000, 1);
format(string, sizeof(string), \"~w~Utas elhagyta a taxit~n~~g~Kerestél: $%d-t\",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
SafeGivePlayerMoney(playerid, -TransportCost[playerid]);
TransportCost[playerid] = 0;
TransportTime[playerid] = 0;
TransportDriver[playerid] = 999;
}
}
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
}
if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
new vehicleid = GetPlayerVehicleID(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty
> 0)
{
if(GetPlayerMoney(playerid) < TransportValue
)
{
format(string, sizeof(string), \"* Szükséged van $%d-ra a beszálláshoz.\", TransportValue
);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeRemovePlayerFromVehicle(playerid);
}
else
{
if(TransportDuty
== 1)
{
format(string, sizeof(string), \"* Fizettél $%d-t a taxisnak.\", TransportValue
);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), \"* Az utas %s beszállt a taxiba.\", name);
SendClientMessage(i, COLOR_WHITE, string);
TransportTime
= 1;
TransportTime[playerid] = 1;
TransportCost[playerid] = TransportValue
;
TransportCost
= TransportValue
;
TransportDriver[playerid] = i;
}
else if(TransportDuty
== 2)
{
format(string, sizeof(string), \"* Fizettél $%d-t a buszsofõrnek.\", TransportValue
);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), \"* Az utas %s beszállt a buszba.\", name);
SendClientMessage(i, COLOR_WHITE, string);
}
SafeGivePlayerMoney(playerid, - TransportValue
);
TransportMoney
+= TransportValue
;
}
}
}
}
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"ADMINSZOLGÁLAT \\n Megtámadni tilos\",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
else if(PlayerInfo[playerid][pTesterDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"SEGÉDSZOLGÁLAT \\n Megtámadni tilos\",0x00AA0099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
}
if(newstate == PLAYER_STATE_WASTED)
{
if(WantedLevel[playerid] >= 1)
{
new price = WantedLevel[playerid] * 1000;
new count;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gTeam
== 2 && CrimInRange(30.0, playerid,i))
{
count = 1;
format(string, sizeof(string), \"~w~Menekülõ gyanusított~r~megölve~n~Bónusz:~g~$%d\", price);
GameTextForPlayer(i, string, 5000, 1);
//ConsumingMoney
= 1;
SafeGivePlayerMoney(i, price / 2);
PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
}
}
}
if(count == 1)
{
SafeGivePlayerMoney(playerid, - price);
PlayerInfo[playerid][pWantedDeaths] += 1;
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(600);
format(string, sizeof(string), \"* Börtönben vagy %d másodpercig és vesztettél $%d-t mert elmenekültél és egy rendõr lelõtt.\", PlayerInfo[playerid][pJailTime], price);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
}
}
}
if(newstate == PLAYER_STATE_DRIVER)
{// 38 / 49 / 56 = SS
new newcar = GetPlayerVehicleID(playerid);
TelePos[playerid][0] = 0.0;
TelePos[playerid][1] = 0.0;
TextDrawShowForPlayer(playerid, Textdraw39[playerid]);
TextDrawShowForPlayer(playerid, Textdraw40[playerid]);
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"ADMINSZOLGÁLAT \\n Megtámadni tilos\",0xFF000099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
else if(PlayerInfo[playerid][pTesterDuty] == 1)
{
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel(\"TESZERSZOLGÁLAT \\n Megtámadni tilos\",0x00AA0099,0,0,0,50,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0);
}
if(IsASalesVehicle(newcar))
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, \"~n~~n~~n~~n~~n~~w~Üdv, írd: ~b~/v buy ~w~hogy megvedd, vagy ~b~/exit~w~ ha nem akarod megvenni!\",10000,4);
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Sales Car\");
}
else
{
if(PlayerInfo[playerid][pCarLic] < 0)
{
if(GetPlayerDrunkLevel(playerid) >= 6000)
{
WantedPoints[playerid] += 1;
SetPlayerCriminal(playerid,255, \"Részeg vezetés\");
}
}
else if(GetPlayerDrunkLevel(playerid) >= 6000)
{
WantedPoints[playerid] += 1;
SetPlayerCriminal(playerid,255, \"Részeg vezetés\");
}
}
if(IsModelABoat(newcar))
{
if(PlayerInfo[playerid][pBoatLic] < 1)
{
SendClientMessage(playerid, COLOR_GREY, \"* Még nem tudod hogyan vitorlázz, ezért elhagytad a csónakot!\");
SafeRemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
}
}
else if(IsModelAPlane(newcar) || IsModelAHeli(newcar))
{
if(PlayerInfo[playerid][pFlyLic] < 1)
{
if(TakingLesson[playerid] == 1) { }
else {
SendClientMessage(playerid, COLOR_GREY, \"* Még nem tudod hogy kell repülni, ezért elhagytad a repülõt !\");
SafeRemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1); }
}
}
else
{
if(PlayerInfo[playerid][pCarLic] == 0)
{
if(TakingLesson[playerid] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, \" Még nincs jogsid! Vezess óvatosan, vagy a rendõrök észreveszik.\");
}
}
}
if(IsAnOwnableCar(newcar))
{
if(PlayerInfo[playerid][pPcarkey] == newcar) { CanTurnEngine[playerid] = newcar; }
else if(PlayerInfo[playerid][pPcarkey2] == newcar) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pAdmin] >= 5 && PlayerInfo[playerid][pAdminDuty] == 1)
{
SendClientMessage(playerid, COLOR_GREY, \" Vezetheted ezt a jármûvet, mert adminszolgálatban vagy!\");
}
else
{
if(CarInfo[newcar][cLock] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
if(PlayerInfo[playerid][pDecoder] == 1)
{
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódolót: /decode\");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY,\"* A kocsi nincs bezárva, tehát beindíthatod a motort!\");
CanTurnEngine[playerid] = newcar;
}
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Megvehetõ kocsi\");
}
else if(IsAnAmbulance(newcar))
{
if(PlayerInfo[playerid][pMember]== 4 && JobDuty[playerid] == 1 || PlayerInfo[playerid][pLeader]== 4 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Mentõautó\");
}
else if(IsACopCar(newcar))
{
if(IsAFreecop(playerid) && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pMember]== 1 && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pLeader]== 1 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Rendõrautó\");
}
else if(IsAFiremenCar(newcar))
{
if(PlayerInfo[playerid][pMember]== 12 && JobDuty[playerid] == 1 || PlayerInfo[playerid][pLeader]== 12 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Tûzoltó kocsi\");
}
else if(IsAnAdminCar(newcar))
{
if(PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 4) { }
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Adminszolgálatban kell lenned (lvl 4+) hogy használhasd ezt a kocsit\");
}
}
else if(IsAnFbiCar(newcar))
{
if(PlayerInfo[playerid][pMember]== 2 && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pLeader]== 2 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: FBI kocsi\");
}
}
else if(IsNgCar(newcar))
{
if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pDuty] == 1 || PlayerInfo[playerid][pLeader]== 3 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6)
{
CanTurnEngine[playerid] = newcar;
}
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: NG kocsi\");
}
else if(IsASwatCar(newcar))
{
if(PlayerInfo[playerid][pMember]== 1 && PlayerInfo[playerid][pDuty] == 1 && PlayerInfo[playerid][pSwat]>= 1 && GetPlayerSkin(playerid) == 285 || PlayerInfo[playerid][pLeader]== 1 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessage(playerid, COLOR_LIGHT_BLUE,\"[DEBUG]: SWAT kocsi\");
}
else if(IsATacticalCar(newcar))
{
if(PlayerInfo[playerid][pMember]== 2 && PlayerInfo[playerid][pDuty] == 1 && PlayerInfo[playerid][pTactical] >= 1 && GetPlayerSkin(playerid) == 285 || PlayerInfo[playerid][pLeader]== 2 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
else
{
SafeRemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"** Nincs dekódered, és nem tudod ellopni ezt a jármûvet\");
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,\"[DEBUG]: Taktikai kocsi\");
}
else if(IsASpecialFCar(newcar))
{
if(PlayerInfo[playerid][pMember] == 3 && PlayerInfo[playerid][pDuty] == 1 && PlayerInfo[playerid][pSpecialF] >= 1 && GetPlayerSkin(playerid) == 179 || PlayerInfo[playerid][pLeader]== 3 || PlayerInfo[playerid][pAdminDuty] == 1 && PlayerInfo[playerid][pAdmin] >= 6) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pDecoder] == 1)
{
CanTurnEngine[playerid] = 9999;
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_GREY, \"Használhatod a dekódert: /decode, vagy kiszállhatsz: /exit\");
}
Naplózva
►ѕтa
2016
Newbie
Admin spec javítása
«
Válasz #3 Dátum:
2011. augusztus 14. - 13:57:49 »
0
Voters list:
õõ talán így
OnPlayerStateChange alá
[pawn]
if(newstate == PLAYER_STATE_DRIVER)
{
new i=-1;
while(i < GetMaxPlayers())
{
if(IsPlayerConnected(i) && GetPlayerState(i) == 9)
{
TogglePlayerSpectate(playerid, 1);
PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));
}
}
}
[/pawn]
Naplózva
sz18k
87
Admin spec javítása
«
Válasz #4 Dátum:
2011. augusztus 15. - 10:42:41 »
0
Voters list:
Oké, köszönöm, megpróbálom!
Dupla hozzászólás automatikusan összefûzve. ( 2011. augusztus 16. - 06:16:37 )
Sajnos nem lett jó...
«
Utoljára szerkesztve: 2011. augusztus 16. - 06:16:37 írta konorbi
»
Naplózva
sz18k
87
Admin spec javítása
«
Válasz #5 Dátum:
2011. augusztus 21. - 09:42:07 »
0
Voters list:
Találtam egy másik admin spec rendszert és az mûködik, zárok!
Naplózva
Nyomtatás
Oldalak: [
1
]
Fel
« előző
következő »
GTA Közösség - A magyar GTA fórum
»
San Andreas Multiplayer (SA-MP)
»
SA-MP: Szerverfejlesztés
»
Szkript kérések
»
Admin spec javítása
ePrivacy and GPDR Cookie Consent by CookieConsent.com
SimplePortal 2.3.7 © 2008-2024, SimplePortal