Nos ezt a scriptett kilehet ugy javitani hogy csak leader birja használni???
#include a_samp
#include zcmd
#define MAX_DROT 200
#define ZOLD 0x03b01aAA
#define SARGA 0xeefa00AA
#define NARANCSS 0xf0a400AA
#define PIROS 0xe60000AA
enum szInfo
{
Van,
Object,
Float: PosX,
Float: PosY,
Float: PosZ,
Float: Fordulas
};
new DrotInfo[MAX_DROT][szInfo];
new foutobject[50];
CMD:lerak(playerid)
{
new string[128];
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, PIROS, \"Kocsiból nem rakhatod le.\");
for(new drot; drot < MAX_DROT; drot++)
{
if(DrotInfo[drot][Van] == 0)
{
GetPlayerPos(playerid, DrotInfo[drot][PosX], DrotInfo[drot][PosY], DrotInfo[drot][PosZ]);
GetPlayerFacingAngle(playerid, DrotInfo[drot][Fordulas]);
DrotInfo[drot][Object] = CreateObject(2892, DrotInfo[drot][PosX], DrotInfo[drot][PosY], DrotInfo[drot][PosZ]-1, 0.0, 0.0, DrotInfo[drot][Fordulas]);
DrotInfo[drot][Van] = 1;
format(string, sizeof(string), \"X: %f Y: %f Z: %f Fordulas: %f | ID: %d\", DrotInfo[drot][PosX], DrotInfo[drot][PosY], DrotInfo[drot][PosZ]-1, DrotInfo[drot][Fordulas], drot);
SendClientMessage(playerid, SARGA, \"Leraktál egy szögesdrótot.\");
SendClientMessage(playerid, NARANCSS, \"Adatok:\");
SendClientMessage(playerid, ZOLD, string);
break;
}
}
return 1;
}
CMD:felszed(playerid)
{
new string[128], Float:x, Float:y, Float:z;
for(new drot; drot < MAX_DROT; drot++)
{
if(DrotInfo[drot][Van] == 1)
{
GetObjectPos(DrotInfo[drot][Object], x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z))
{
DestroyObject(DrotInfo[drot][Object]);
format(string, sizeof(string), \"X: %f Y: %f Z: %f Fordulas: %f | ID: %d\", DrotInfo[drot][PosX], DrotInfo[drot][PosY], DrotInfo[drot][PosZ], DrotInfo[drot][Fordulas], drot);
DrotInfo[drot][Van] = 0;
DrotInfo[drot][PosX] = 0;
DrotInfo[drot][PosY] = 0;
DrotInfo[drot][PosZ] = 0;
DrotInfo[drot][Fordulas] = 0;
SendClientMessage(playerid, SARGA, \"Felszedtél egy szögesdrótot.\");
SendClientMessage(playerid, NARANCSS, \"Adatok:\");
SendClientMessage(playerid, ZOLD, string);
break;
}
}
}
return 1;
}
CMD:felszedall(playerid)
{
for(new drot; drot < MAX_DROT; drot++)
{
DestroyObject(DrotInfo[drot][Object]);
DrotInfo[drot][Van] = 0;
DrotInfo[drot][PosX] = 0;
DrotInfo[drot][PosY] = 0;
DrotInfo[drot][PosZ] = 0;
DrotInfo[drot][Fordulas] = 0;
}
SendClientMessage(playerid, SARGA, \"Felszedted az összes szögesdrótot.\");
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:x, Float:y, Float:z;
new panels, doors, lights, tires;
new vehicleid = GetPlayerVehicleID(playerid);
for(new drot; drot < MAX_DROT; drot++)
{
if(DrotInfo[drot][Van] == 1)
{
GetObjectPos(DrotInfo[drot][Object], x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 4.0, x, y, z) && IsPlayerInAnyVehicle(playerid))
{
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15);
break;
}
}
}
GetObjectPos(foutobject[49], x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 4.0, x, y, z) && IsPlayerInAnyVehicle(playerid))
{
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, 15);
}
return 1;
}
Leaderek:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
if(PlayerInfo[playerid][szervLeader] == 4 || PlayerInfo[playerid][szervTag] == 4)