[Pedido] Verificar se veiculo estб carregado!
#1

Bom, alguйm poderia passar algum code pra verificar se um veiculo estб carregado ou nгo, para retornar uma mensagem? Й pra profissгo de caminhoneiro que estou tentando criar, se alguйm puder ajudar, ficarei grato!


OBS: Criei o comando carregar, ai quero bloquear outra carga se ja estiver carregado.
Reply
#2

Ultilize o YSF, tem otimas features novas:
PHP код:
/* YSF - kurta999's version */
#if defined _YSF_included
    #endinput
#endif
#define _YSF_included

// Definitions
enum E_SERVER_RULE_FLAGS (<<= 1)
{
    
CON_VARFLAG_DEBUG 1,
    
CON_VARFLAG_READONLY,
    
CON_VARFLAG_RULE,
    
CON_VARFLAG_UNREMOVABLE
}

enum E_SCM_EVENT_TYPE
{
    
SCM_EVENT_PAINTJOB 1,
    
SCM_EVENT_MOD 2,
    
SCM_EVENT_RESPRAY 3,
    
SCM_EVENT_MOD_SHOP 4
}

// File functions
native ffind(const pattern[], filename[], len, &idx);
native frename(const oldname[], const newname[]);

// Directory functions
native dfind(const pattern[], filename[], len, &idx);
native dcreate(const name[]);
native drename(const oldname[], const newname[]);

// Gamemode restart time
native SetModeRestartTime(Float:time);
native Float:GetModeRestartTime();

// Player position sync bounds
native GetSyncBounds(&Float:hmin, &Float:hmax, &Float:vmin, &Float:vmax);
native SetSyncBounds(Float:hminFloat:hmaxFloat:vminFloat:vmax);

// Max player/npc change at runtime
native SetMaxPlayers(maxplayers);
native SetMaxNPCs(maxnpcs);

// Filterscript functions
native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
native UnLoadFilterScript(const scriptname[]); // ^
native GetFilterScriptCount();
native GetFilterScriptName(idname[], len sizeof(name));

// Server rule modifications
native AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags CON_VARFLAG_RULE);
native SetServerRule(const name[], const value[]);
native IsValidServerRule(const name[]);
native SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags);
native E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[]);
// Just for backward compatibility...
native ModifyFlag(const name[], flags);

// Server settings
native GetServerSettings(&showplayermarkes, &shownametags, &stuntbonus, &useplayerpedanims, &bLimitchatradius, &disableinteriorenterexits, &nametaglos, &manualvehicleengine, &limitplayermarkers, &vehiclefriendlyfire, &defaultcameracollision, &Float:fGlobalchatradius, &Float:fNameTagDrawDistance, &Float:fPlayermarkerslimit);

// YSF settings
native YSF_SetTickRate(ticks);
native YSF_GetTickRate();
native YSF_EnableNightVisionFix(enable);
native YSF_IsNightVisionFixEnabled();
native YSF_SetExtendedNetStatsEnabled(enable);
native YSF_IsExtendedNetStatsEnabled();
native YSF_SetAFKAccuracy(time_ms);
native YSF_GetAFKAccuracy();
native YSF_ToggleNPCTracking(bool:enable);
native YSF_IsNPCTrackingEnabled();

native SetRecordingDirectory(const dir[]);
native GetRecordingDirectory(dir[], len sizeof(dir));

// Nickname
native IsValidNickName(const name[]);
native AllowNickNameCharacter(characterbool:allow);
native IsNickNameCharacterAllowed(character);

// Classes
native GetAvailableClasses();
native GetPlayerClass(classid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native EditPlayerClass(classidteamidmodelidFloat:spawn_xFloat:spawn_yFloat:spawn_zFloat:z_angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo);

// Timers
native GetRunningTimers();

// Per player things
native SetPlayerGravity(playeridFloat:gravity);
native Float:GetPlayerGravity(playerid);
native SetPlayerAdmin(playeridbool:admin); // Set player as RCON admin
native SetPlayerTeamForPlayer(playeridteamplayeridteamid);
native GetPlayerTeamForPlayer(playeridteamplayerid);
native SetPlayerSkinForPlayer(playeridskinplayeridskin);
native GetPlayerSkinForPlayer(playeridskinplayerid);
native SetPlayerNameForPlayer(playeridnameplayerid, const playername[]);
native GetPlayerNameForPlayer(playeridnameplayeridplayername[], size sizeof(playername));
native SetPlayerFightStyleForPlayer(playeridstyleplayeridstyle);
native GetPlayerFightStyleForPlayer(playeridskinplayerid);
native SetPlayerPosForPlayer(playeridposplayeridFloat:fXFloat:fYFloat:fZbool:forcesync true);
native SetPlayerRotationQuatForPlayer(playeridquatplayeridFloat:wFloat:xFloat:yFloat:zbool:forcesync true);
native ApplyAnimationForPlayer(playeridanimplayerid, const animlib[], const animname[], Float:fDeltalooplockxlockyfreezetime); // DOESN'T WORK
native GetPlayerWeather(playerid);
native TogglePlayerWidescreen(playeridbool:set);
native IsPlayerWidescreenToggled(playerid);
native GetSpawnInfo(playerid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native GetPlayerSkillLevel(playeridskill);
native IsPlayerCheckpointActive(playerid);
native GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fSize);
native IsPlayerRaceCheckpointActive(playerid);
native GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fNextX, &Float:fNextY, &Float:fNextZ, &Float:fSize);
native GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min, &Float:y_max, &Float:y_min);
native IsPlayerInModShop(playerid);
native GetPlayerSirenState(playerid);
native GetPlayerLandingGearState(playerid);
native GetPlayerHydraReactorAngle(playerid);
native Float:GetPlayerTrainSpeed(playerid);
native Float:GetPlayerZAim(playerid);
native GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ);
native GetPlayerRotationQuat(playerid, &Float:w, &Float:x, &Float:y, &Float:z);
native GetPlayerSpectateID(playerid);
native GetPlayerSpectateType(playerid);
native GetPlayerLastSyncedVehicleID(playerid);
native GetPlayerLastSyncedTrailerID(playerid);

native SendBulletData(senderhitidhittypeweaponidFloat:fHitOriginXFloat:fHitOriginYFloat:fHitOriginZFloat:fHitTargetXFloat:fHitTargetYFloat:fHitTargetZFloat:fCenterOfHitXFloat:fCenterOfHitYFloat:fCenterOfHitZforplayerid = -1);
native ShowPlayerForPlayer(forplayeridplayerid);
native HidePlayerForPlayer(forplayeridplayerid);
native AddPlayerForPlayer(forplayeridplayeridisnpc 0);
native RemovePlayerForPlayer(forplayeridplayerid);
native SetPlayerChatBubbleForPlayer(forplayeridplayerid, const text[], colorFloat:drawdistanceexpiretime);
native ResetPlayerMarkerForPlayer(playeridresetplayerid);
native SetPlayerVersion(playerid, const version[]);
native IsPlayerSpawned(playerid);
native IsPlayerControllable(playerid);
native SpawnForWorld(playerid);
native BroadcastDeath(playerid);
native IsPlayerCameraTargetEnabled(playerid);
native SetPlayerDisabledKeysSync(playeridkeys);
native GetPlayerDisabledKeysSync(playerid);

native GetNPCCommandLine(npcidscript[], length=sizeof(script));

// Actors
native GetActorSpawnInfo(actorid, &skinid, &Float:fX, &Float:fY, &Float:fZ, &Float:fAngle);
native GetActorSkin(actorid);
native GetActorAnimation(actoridanimlib[], animlibsize sizeof(animlib), animname[], animnamesize sizeof(animname), &Float:fDelta, &loop, &lockx, &locky, &freeze, &time);

// Scoreboard manipulation
native TogglePlayerScoresPingsUpdate(playeridbool:toggle);
native TogglePlayerFakePing(playeridbool:toggle);
native SetPlayerFakePing(playeridping);
native TogglePlayerInServerQuery(playeridbool:toggle);
native IsPlayerToggledInServerQuery(playerid);

// Pause functions
native IsPlayerPaused(playerid);
native GetPlayerPausedTime(playerid);

// Objects get - global
native Float:GetObjectDrawDistance(objectid);
native SetObjectMoveSpeed(objectidFloat:fSpeed);
native Float:GetObjectMoveSpeed(objectid);
native GetObjectTarget(objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsObjectMaterialSlotUsed(objectidmaterialindex); // Return values: 1 = material, 2 = material text
native GetObjectMaterial(objectidmaterialindex, &modelidtxdname[], txdnamelen sizeof(txdname), texturename[], texturenamelen sizeof(texturename), &materialcoor);
native GetObjectMaterialText(objectidmaterialindextext[], textlen sizeof(text), &materialsizefontface[], fontfacelen sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsObjectNoCameraCol(objectid);

// Objects get - player
native Float:GetPlayerObjectDrawDistance(playeridobjectid);
native SetPlayerObjectMoveSpeed(playeridobjectidFloat:fSpeed);
native Float:GetPlayerObjectMoveSpeed(playeridobjectid);
native Float:GetPlayerObjectTarget(playeridobjectid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerObjectAttachedData(playeridobjectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetPlayerObjectAttachedOffset(playeridobjectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsPlayerObjectMaterialSlotUsed(playeridobjectidmaterialindex); // Return values: 1 = material, 2 = material text
native GetPlayerObjectMaterial(playeridobjectidmaterialindex, &modelidtxdname[], txdnamelen sizeof(txdname), texturename[], texturenamelen sizeof(texturename), &materialcolor);
native GetPlayerObjectMaterialText(playeridobjectidmaterialindextext[], textlen sizeof(text), &materialsizefontface[], fontfacelen sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsPlayerObjectNoCameraCol(playeridobjectid);
native GetPlayerSurfingPlayerObjectID(playerid);
native GetPlayerCameraTargetPlayerObj(playerid);
native GetObjectType(playeridobjectid);

// special - for attached objects
native GetPlayerAttachedObject(playeridindex, &modelid, &bone, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fSacleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2);

//n_ative AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native AttachPlayerObjectToObject(playeridobjectidattachtoidFloat:OffsetXFloat:OffsetYFloat:OffsetZFloat:RotXFloat:RotYFloat:RotZSyncRotation 1);

// RakNet ban functions
native ClearBanList();
native IsBanned(const ipaddress[]);

// RakNet
native SetTimeoutTime(playeridtime_ms);
native GetMTUSize();
native GetLocalIP(indexlocalip[], len sizeof(localip));

// Vehicle functions
native GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2);
native SetVehicleSpawnInfo(vehicleidmodelidFloat:fXFloat:fYFloat:fZFloat:fAnglecolor1color2respawntime = -2interior = -2);
#if !defined GetVehicleColor
native GetVehicleColor(vehicleid, &color1, &color2);
#endif
#if !defined GetVehiclePaintjob
native GetVehiclePaintjob(vehicleid);
#endif
#if !defined GetVehicleInterior
native GetVehicleInterior(vehicleid);
#endif
native GetVehicleNumberPlate(vehicleidplate[], len sizeof(plate));
native SetVehicleRespawnDelay(vehicleiddelay);
native GetVehicleRespawnDelay(vehicleid);
native SetVehicleOccupiedTick(vehicleidticks);
native GetVehicleOccupiedTick(vehicleid); // GetTickCount() - GetVehicleOccupiedTick(vehicleid) = time passed since vehicle is occupied, in ms
native SetVehicleRespawnTick(vehicleidticks);
native GetVehicleRespawnTick(vehicleid); // GetTickCount() - GetVehicleRespawnTick(vehicleid) = time passed since vehicle spawned, in ms
native GetVehicleLastDriver(vehicleid);
native GetVehicleCab(vehicleid);
native HasVehicleBeenOccupied(vehicleid);
native SetVehicleBeenOccupied(vehicleidoccupied);
native IsVehicleOccupied(vehicleid);
native IsVehicleDead(vehicleid);
native GetVehicleModelCount(modelid);
native GetVehicleModelsUsed();
native SetVehicleParamsSirenState(vehicleidsirenState);
native ToggleVehicleSirenEnabled(vehicleidbool:enabled);
native IsVehicleSirenEnabled(vehicleid);
native GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);
native SetVehicleMatrix(vehicleidFloat:rightXFloat:rightYFloat:rightZFloat:upXFloat:upYFloat:upZFloat:atXFloat:atYFloat:atZ);

// Gangzones - Global
native IsValidGangZone(zoneid);
native IsPlayerInGangZone(playeridzoneid);
native IsGangZoneVisibleForPlayer(playeridzoneid);
native GangZoneGetColorForPlayer(playeridzoneid);
native GangZoneGetFlashColorForPlayer(playeridzoneid);
native IsGangZoneFlashingForPlayer(playeridzoneid);
native GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);

// Gangzones - Player
native CreatePlayerGangZone(playeridFloat:minxFloat:minyFloat:maxxFloat:maxy);
native PlayerGangZoneDestroy(playeridzoneid);
native PlayerGangZoneShow(playeridzoneidcolor);
native PlayerGangZoneHide(playeridzoneid);
native PlayerGangZoneFlash(playeridzoneidcolor);
native PlayerGangZoneStopFlash(playeridzoneid);
native IsValidPlayerGangZone(playeridzoneid);
native IsPlayerInPlayerGangZone(playeridzoneid);
native IsPlayerGangZoneVisible(playeridzoneid);
native PlayerGangZoneGetColor(playeridzoneid);
native PlayerGangZoneGetFlashColor(playeridzoneid);
native IsPlayerGangZoneFlashing(playeridzoneid);
native PlayerGangZoneGetPos(playeridzoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);

// Textdraw - Global
native IsValidTextDraw(Text:textdrawid);
native IsTextDrawVisibleForPlayer(playeridText:textdrawid);
native TextDrawGetString(Text:textdrawidtext[], len sizeof(text));
native TextDrawSetPos(Text:textdrawidFloat:fXFloat:fY); // You can change textdraw pos with it, but you need to use TextDrawShowForPlayer() after that
native TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetColor(Text:textdrawid);
native TextDrawGetBoxColor(Text:textdrawid);
native TextDrawGetBackgroundColor(Text:textdrawid);
native TextDrawGetShadow(Text:textdrawid);
native TextDrawGetOutline(Text:textdrawid);
native TextDrawGetFont(Text:textdrawid);
native TextDrawIsBox(Text:textdrawid);
native TextDrawIsProportional(Text:textdrawid);
native TextDrawIsSelectable(Text:textdrawid);
native TextDrawGetAlignment(Text:textdrawid);
native TextDrawGetPreviewModel(Text:textdrawid);
native TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2);

// Textdraw - Player
native IsValidPlayerTextDraw(playeridPlayerText:textdrawid);
native IsPlayerTextDrawVisible(playeridPlayerText:textdrawid);
native PlayerTextDrawGetString(playeridPlayerText:textdrawidtext[], len sizeof(text));
native PlayerTextDrawSetPos(playeridPlayerText:textdrawidFloat:fXFloat:fY);
native PlayerTextDrawGetLetterSize(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetTextSize(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetPos(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetColor(playeridPlayerText:textdrawid);
native PlayerTextDrawGetBoxColor(playeridPlayerText:textdrawid);
native PlayerTextDrawGetBackgroundCol(playeridPlayerText:textdrawid);
native PlayerTextDrawGetShadow(playeridPlayerText:textdrawid);
native PlayerTextDrawGetOutline(playeridPlayerText:textdrawid);
native PlayerTextDrawGetFont(playeridPlayerText:textdrawid);
native PlayerTextDrawIsBox(playeridPlayerText:textdrawid);
native PlayerTextDrawIsProportional(playeridPlayerText:textdrawid);
native PlayerTextDrawIsSelectable(playeridPlayerText:textdrawid);
native PlayerTextDrawGetAlignment(playeridPlayerText:textdrawid);
native PlayerTextDrawGetPreviewModel(playeridPlayerText:textdrawid);
native PlayerTextDrawGetPreviewRot(playeridPlayerText:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native PlayerTextDrawGetPreviewVehCol(playeridPlayerText:textdrawid, &color1, &color2);

// 3D Text - Global
native IsValid3DTextLabel(Text3D:id);
native Is3DTextLabelStreamedIn(playeridText3D:id);
native Get3DTextLabelText(Text3D:idtext[], len sizeof(text));
native Get3DTextLabelColor(Text3D:id);
native Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:Get3DTextLabelDrawDistance(Text3D:id);
native Get3DTextLabelLOS(Text3D:id);
native Get3DTextLabelVirtualWorld(Text3D:id);
native Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid);

// 3D Text - Player
native IsValidPlayer3DTextLabel(playeridPlayerText3D:id);
native GetPlayer3DTextLabelText(playeridPlayerText3D:idtext[], len sizeof(text));
native GetPlayer3DTextLabelColor(playeridPlayerText3D:id);
native GetPlayer3DTextLabelPos(playeridPlayerText3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:GetPlayer3DTextLabelDrawDist(playeridPlayerText3D:id);
native GetPlayer3DTextLabelLOS(playeridPlayerText3D:id);
native GetPlayer3DTextLabelVirtualW(playeridPlayerText3D:id);
native GetPlayer3DTextLabelAttached(playeridPlayerText3D:id, &attached_playerid, &attached_vehicleid);

// Menu
native IsMenuDisabled(Menu:menuid);
native IsMenuRowDisabled(Menu:menuidrow);
native GetMenuColumns(Menu:menuid);
native GetMenuItems(Menu:menuidcolumn);
native GetMenuPos(Menu:menuid, &Float:fX, &Float:fY);
native GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2);
native GetMenuColumnHeader(Menu:menuidcolumnheader[], len sizeof(header));
native GetMenuItem(Menu:menuidcolumnitemiditem[], len sizeof(item));

// Pickups - Global
native IsValidPickup(pickupid);
native IsPickupStreamedIn(playeridpickupid);
native GetPickupPos(pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPickupModel(pickupid);
native GetPickupType(pickupid);
native GetPickupVirtualWorld(pickupid);
/*
// Pickups - Player
native CreatePlayerPickup(playerid, model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPlayerPickup(playerid, pickupid);
native IsValidPlayerPickup(playerid, pickupid);
native IsPlayerPickupStreamedIn(playerid, pickupid);
native GetPlayerPickupPos(playerid, pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerPickupModel(playerid, pickupid);
native GetPlayerPickupType(playerid, pickupid);
native GetPlayerPickupVirtualWorld(playerid, pickupid);
*/
// ******'s model sizes inc
native GetColCount();
native Float:GetColSphereRadius(modelid);
native GetColSphereOffset(modelid, &Float:fX, &Float:fY, &Float:fZ);

// Formatting
native SendClientMessagef(playeridcolor, const message[], {Float,_}:...);
native SendClientMessageToAllf(color, const message[], {Float,_}:...);
native GameTextForPlayerf(playeriddisplaytimestyle, const message[], {Float,_}:...);
native GameTextForAllf(displaytimestyle, const message[], {Float,_}:...);
native SendPlayerMessageToPlayerf(playeridsenderid, const message[], {Float,_}:...);
native SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...);
native SendRconCommandf(const command[], {Float,_}:...);

// Callbacks
forward OnPlayerEnterGangZone(playeridzoneid);
forward OnPlayerLeaveGangZone(playeridzoneid);
forward OnPlayerEnterPlayerGangZone(playeridzoneid);
forward OnPlayerLeavePlayerGangZone(playeridzoneid);
forward OnPlayerPickUpPlayerPickup(playeridpickupid);
forward OnPlayerPauseStateChange(playeridpausestate);
forward OnPlayerStatsAndWeaponsUpdate(playerid);
forward OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[]);
forward OnServerMessage(const msg[]);
forward OnPlayerClientGameInit(playerid, &usecjwalk, &limitglobalchat, &Float:globalchatradius, &Float:nametagdistance, &disableenterexits, &nametaglos, &manualvehengineandlights, &spawnsavailable, &shownametags, &showplayermarkers, &onfoot_rate, &incar_rate, &weapon_rate, &lacgompmode, &vehiclefriendlyfire);
forward OnOutcomeScmEvent(playeridissueridE_SCM_EVENT_TYPE:eventidvehicleidarg1arg2);
forward OnServerQueryInfo(addr[], hostname[51], gameMode[31], language[31]);

//////////////////////////////////////////////////////////////
// Fixes
//////////////////////////////////////////////////////////////

// No comment..
#if !defined IsValidVehicle
    
native IsValidVehicle(vehicleid);
#endif

#if !defined GetGravity
    
native Float:GetGravity();
#endif

native GetWeather();
native GetWeaponSlot(weaponid);

enum
{
    
BS_BOOL,
    
BS_CHAR,
    
BS_UNSIGNEDCHAR,
    
BS_SHORT,
    
BS_UNSIGNEDSHORT,
    
BS_INT,
    
BS_UNSIGNEDINT,
    
BS_FLOAT,
    
BS_STRING
};

// Developer functions
native SendRPC(playeridRPC, {Float,_}:...); // playerid == -1 -> broadcast
native SendData(playerid, {Float,_}:...); // playerid == -1 -> broadcast

/* EXAMPLE
CMD:pickup(playerid, params[])
{
    new
        Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);

    SendRPC(playerid, 95, // rpcid
        BS_INT, strval(params), // int - pickupid
        BS_INT, 1222,    // int - modelid
        BS_INT, 19,     // int   - type
        BS_FLOAT, X + 2.0,   // float
        BS_FLOAT, Y,     // float
        BS_FLOAT, Z);    // float
    return 1;
}

CMD:destroypickup(playerid, params[])
{
    SendRPC(playerid, 63, // rpcid
        BS_INT, strval(params));    // int - pickupid
    return 1;
}
*/ 
Reply
#3

Quote:
Originally Posted by RazorGuigo
Посмотреть сообщение
Ultilize o YSF, tem otimas features novas:
PHP код:
/* YSF - kurta999's version */
#if defined _YSF_included
    #endinput
#endif
#define _YSF_included
// Definitions
enum E_SERVER_RULE_FLAGS (<<= 1)
{
    
CON_VARFLAG_DEBUG 1,
    
CON_VARFLAG_READONLY,
    
CON_VARFLAG_RULE,
    
CON_VARFLAG_UNREMOVABLE
}
enum E_SCM_EVENT_TYPE
{
    
SCM_EVENT_PAINTJOB 1,
    
SCM_EVENT_MOD 2,
    
SCM_EVENT_RESPRAY 3,
    
SCM_EVENT_MOD_SHOP 4
}
// File functions
native ffind(const pattern[], filename[], len, &idx);
native frename(const oldname[], const newname[]);
// Directory functions
native dfind(const pattern[], filename[], len, &idx);
native dcreate(const name[]);
native drename(const oldname[], const newname[]);
// Gamemode restart time
native SetModeRestartTime(Float:time);
native Float:GetModeRestartTime();
// Player position sync bounds
native GetSyncBounds(&Float:hmin, &Float:hmax, &Float:vmin, &Float:vmax);
native SetSyncBounds(Float:hminFloat:hmaxFloat:vminFloat:vmax);
// Max player/npc change at runtime
native SetMaxPlayers(maxplayers);
native SetMaxNPCs(maxnpcs);
// Filterscript functions
native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
native UnLoadFilterScript(const scriptname[]); // ^
native GetFilterScriptCount();
native GetFilterScriptName(idname[], len sizeof(name));
// Server rule modifications
native AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags CON_VARFLAG_RULE);
native SetServerRule(const name[], const value[]);
native IsValidServerRule(const name[]);
native SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags);
native E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[]);
// Just for backward compatibility...
native ModifyFlag(const name[], flags);
// Server settings
native GetServerSettings(&showplayermarkes, &shownametags, &stuntbonus, &useplayerpedanims, &bLimitchatradius, &disableinteriorenterexits, &nametaglos, &manualvehicleengine, &limitplayermarkers, &vehiclefriendlyfire, &defaultcameracollision, &Float:fGlobalchatradius, &Float:fNameTagDrawDistance, &Float:fPlayermarkerslimit);
// YSF settings
native YSF_SetTickRate(ticks);
native YSF_GetTickRate();
native YSF_EnableNightVisionFix(enable);
native YSF_IsNightVisionFixEnabled();
native YSF_SetExtendedNetStatsEnabled(enable);
native YSF_IsExtendedNetStatsEnabled();
native YSF_SetAFKAccuracy(time_ms);
native YSF_GetAFKAccuracy();
native YSF_ToggleNPCTracking(bool:enable);
native YSF_IsNPCTrackingEnabled();
native SetRecordingDirectory(const dir[]);
native GetRecordingDirectory(dir[], len sizeof(dir));
// Nickname
native IsValidNickName(const name[]);
native AllowNickNameCharacter(characterbool:allow);
native IsNickNameCharacterAllowed(character);
// Classes
native GetAvailableClasses();
native GetPlayerClass(classid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native EditPlayerClass(classidteamidmodelidFloat:spawn_xFloat:spawn_yFloat:spawn_zFloat:z_angleweapon1weapon1_ammoweapon2weapon2_ammoweapon3weapon3_ammo);
// Timers
native GetRunningTimers();
// Per player things
native SetPlayerGravity(playeridFloat:gravity);
native Float:GetPlayerGravity(playerid);
native SetPlayerAdmin(playeridbool:admin); // Set player as RCON admin
native SetPlayerTeamForPlayer(playeridteamplayeridteamid);
native GetPlayerTeamForPlayer(playeridteamplayerid);
native SetPlayerSkinForPlayer(playeridskinplayeridskin);
native GetPlayerSkinForPlayer(playeridskinplayerid);
native SetPlayerNameForPlayer(playeridnameplayerid, const playername[]);
native GetPlayerNameForPlayer(playeridnameplayeridplayername[], size sizeof(playername));
native SetPlayerFightStyleForPlayer(playeridstyleplayeridstyle);
native GetPlayerFightStyleForPlayer(playeridskinplayerid);
native SetPlayerPosForPlayer(playeridposplayeridFloat:fXFloat:fYFloat:fZbool:forcesync true);
native SetPlayerRotationQuatForPlayer(playeridquatplayeridFloat:wFloat:xFloat:yFloat:zbool:forcesync true);
native ApplyAnimationForPlayer(playeridanimplayerid, const animlib[], const animname[], Float:fDeltalooplockxlockyfreezetime); // DOESN'T WORK
native GetPlayerWeather(playerid);
native TogglePlayerWidescreen(playeridbool:set);
native IsPlayerWidescreenToggled(playerid);
native GetSpawnInfo(playerid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
native GetPlayerSkillLevel(playeridskill);
native IsPlayerCheckpointActive(playerid);
native GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fSize);
native IsPlayerRaceCheckpointActive(playerid);
native GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fNextX, &Float:fNextY, &Float:fNextZ, &Float:fSize);
native GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min, &Float:y_max, &Float:y_min);
native IsPlayerInModShop(playerid);
native GetPlayerSirenState(playerid);
native GetPlayerLandingGearState(playerid);
native GetPlayerHydraReactorAngle(playerid);
native Float:GetPlayerTrainSpeed(playerid);
native Float:GetPlayerZAim(playerid);
native GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ);
native GetPlayerRotationQuat(playerid, &Float:w, &Float:x, &Float:y, &Float:z);
native GetPlayerSpectateID(playerid);
native GetPlayerSpectateType(playerid);
native GetPlayerLastSyncedVehicleID(playerid);
native GetPlayerLastSyncedTrailerID(playerid);
native SendBulletData(senderhitidhittypeweaponidFloat:fHitOriginXFloat:fHitOriginYFloat:fHitOriginZFloat:fHitTargetXFloat:fHitTargetYFloat:fHitTargetZFloat:fCenterOfHitXFloat:fCenterOfHitYFloat:fCenterOfHitZforplayerid = -1);
native ShowPlayerForPlayer(forplayeridplayerid);
native HidePlayerForPlayer(forplayeridplayerid);
native AddPlayerForPlayer(forplayeridplayeridisnpc 0);
native RemovePlayerForPlayer(forplayeridplayerid);
native SetPlayerChatBubbleForPlayer(forplayeridplayerid, const text[], colorFloat:drawdistanceexpiretime);
native ResetPlayerMarkerForPlayer(playeridresetplayerid);
native SetPlayerVersion(playerid, const version[]);
native IsPlayerSpawned(playerid);
native IsPlayerControllable(playerid);
native SpawnForWorld(playerid);
native BroadcastDeath(playerid);
native IsPlayerCameraTargetEnabled(playerid);
native SetPlayerDisabledKeysSync(playeridkeys);
native GetPlayerDisabledKeysSync(playerid);
native GetNPCCommandLine(npcidscript[], length=sizeof(script));
// Actors
native GetActorSpawnInfo(actorid, &skinid, &Float:fX, &Float:fY, &Float:fZ, &Float:fAngle);
native GetActorSkin(actorid);
native GetActorAnimation(actoridanimlib[], animlibsize sizeof(animlib), animname[], animnamesize sizeof(animname), &Float:fDelta, &loop, &lockx, &locky, &freeze, &time);
// Scoreboard manipulation
native TogglePlayerScoresPingsUpdate(playeridbool:toggle);
native TogglePlayerFakePing(playeridbool:toggle);
native SetPlayerFakePing(playeridping);
native TogglePlayerInServerQuery(playeridbool:toggle);
native IsPlayerToggledInServerQuery(playerid);
// Pause functions
native IsPlayerPaused(playerid);
native GetPlayerPausedTime(playerid);
// Objects get - global
native Float:GetObjectDrawDistance(objectid);
native SetObjectMoveSpeed(objectidFloat:fSpeed);
native Float:GetObjectMoveSpeed(objectid);
native GetObjectTarget(objectid, &Float:fX, &Float:fY, &Float:fZ);
native GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsObjectMaterialSlotUsed(objectidmaterialindex); // Return values: 1 = material, 2 = material text
native GetObjectMaterial(objectidmaterialindex, &modelidtxdname[], txdnamelen sizeof(txdname), texturename[], texturenamelen sizeof(texturename), &materialcoor);
native GetObjectMaterialText(objectidmaterialindextext[], textlen sizeof(text), &materialsizefontface[], fontfacelen sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsObjectNoCameraCol(objectid);
// Objects get - player
native Float:GetPlayerObjectDrawDistance(playeridobjectid);
native SetPlayerObjectMoveSpeed(playeridobjectidFloat:fSpeed);
native Float:GetPlayerObjectMoveSpeed(playeridobjectid);
native Float:GetPlayerObjectTarget(playeridobjectid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerObjectAttachedData(playeridobjectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
native GetPlayerObjectAttachedOffset(playeridobjectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
native IsPlayerObjectMaterialSlotUsed(playeridobjectidmaterialindex); // Return values: 1 = material, 2 = material text
native GetPlayerObjectMaterial(playeridobjectidmaterialindex, &modelidtxdname[], txdnamelen sizeof(txdname), texturename[], texturenamelen sizeof(texturename), &materialcolor);
native GetPlayerObjectMaterialText(playeridobjectidmaterialindextext[], textlen sizeof(text), &materialsizefontface[], fontfacelen sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
native IsPlayerObjectNoCameraCol(playeridobjectid);
native GetPlayerSurfingPlayerObjectID(playerid);
native GetPlayerCameraTargetPlayerObj(playerid);
native GetObjectType(playeridobjectid);
// special - for attached objects
native GetPlayerAttachedObject(playeridindex, &modelid, &bone, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fSacleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2);
//n_ative AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native AttachPlayerObjectToObject(playeridobjectidattachtoidFloat:OffsetXFloat:OffsetYFloat:OffsetZFloat:RotXFloat:RotYFloat:RotZSyncRotation 1);
// RakNet ban functions
native ClearBanList();
native IsBanned(const ipaddress[]);
// RakNet
native SetTimeoutTime(playeridtime_ms);
native GetMTUSize();
native GetLocalIP(indexlocalip[], len sizeof(localip));
// Vehicle functions
native GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2);
native SetVehicleSpawnInfo(vehicleidmodelidFloat:fXFloat:fYFloat:fZFloat:fAnglecolor1color2respawntime = -2interior = -2);
#if !defined GetVehicleColor
native GetVehicleColor(vehicleid, &color1, &color2);
#endif
#if !defined GetVehiclePaintjob
native GetVehiclePaintjob(vehicleid);
#endif
#if !defined GetVehicleInterior
native GetVehicleInterior(vehicleid);
#endif
native GetVehicleNumberPlate(vehicleidplate[], len sizeof(plate));
native SetVehicleRespawnDelay(vehicleiddelay);
native GetVehicleRespawnDelay(vehicleid);
native SetVehicleOccupiedTick(vehicleidticks);
native GetVehicleOccupiedTick(vehicleid); // GetTickCount() - GetVehicleOccupiedTick(vehicleid) = time passed since vehicle is occupied, in ms
native SetVehicleRespawnTick(vehicleidticks);
native GetVehicleRespawnTick(vehicleid); // GetTickCount() - GetVehicleRespawnTick(vehicleid) = time passed since vehicle spawned, in ms
native GetVehicleLastDriver(vehicleid);
native GetVehicleCab(vehicleid);
native HasVehicleBeenOccupied(vehicleid);
native SetVehicleBeenOccupied(vehicleidoccupied);
native IsVehicleOccupied(vehicleid);
native IsVehicleDead(vehicleid);
native GetVehicleModelCount(modelid);
native GetVehicleModelsUsed();
native SetVehicleParamsSirenState(vehicleidsirenState);
native ToggleVehicleSirenEnabled(vehicleidbool:enabled);
native IsVehicleSirenEnabled(vehicleid);
native GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);
native SetVehicleMatrix(vehicleidFloat:rightXFloat:rightYFloat:rightZFloat:upXFloat:upYFloat:upZFloat:atXFloat:atYFloat:atZ);
// Gangzones - Global
native IsValidGangZone(zoneid);
native IsPlayerInGangZone(playeridzoneid);
native IsGangZoneVisibleForPlayer(playeridzoneid);
native GangZoneGetColorForPlayer(playeridzoneid);
native GangZoneGetFlashColorForPlayer(playeridzoneid);
native IsGangZoneFlashingForPlayer(playeridzoneid);
native GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
// Gangzones - Player
native CreatePlayerGangZone(playeridFloat:minxFloat:minyFloat:maxxFloat:maxy);
native PlayerGangZoneDestroy(playeridzoneid);
native PlayerGangZoneShow(playeridzoneidcolor);
native PlayerGangZoneHide(playeridzoneid);
native PlayerGangZoneFlash(playeridzoneidcolor);
native PlayerGangZoneStopFlash(playeridzoneid);
native IsValidPlayerGangZone(playeridzoneid);
native IsPlayerInPlayerGangZone(playeridzoneid);
native IsPlayerGangZoneVisible(playeridzoneid);
native PlayerGangZoneGetColor(playeridzoneid);
native PlayerGangZoneGetFlashColor(playeridzoneid);
native IsPlayerGangZoneFlashing(playeridzoneid);
native PlayerGangZoneGetPos(playeridzoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
// Textdraw - Global
native IsValidTextDraw(Text:textdrawid);
native IsTextDrawVisibleForPlayer(playeridText:textdrawid);
native TextDrawGetString(Text:textdrawidtext[], len sizeof(text));
native TextDrawSetPos(Text:textdrawidFloat:fXFloat:fY); // You can change textdraw pos with it, but you need to use TextDrawShowForPlayer() after that
native TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY);
native TextDrawGetColor(Text:textdrawid);
native TextDrawGetBoxColor(Text:textdrawid);
native TextDrawGetBackgroundColor(Text:textdrawid);
native TextDrawGetShadow(Text:textdrawid);
native TextDrawGetOutline(Text:textdrawid);
native TextDrawGetFont(Text:textdrawid);
native TextDrawIsBox(Text:textdrawid);
native TextDrawIsProportional(Text:textdrawid);
native TextDrawIsSelectable(Text:textdrawid);
native TextDrawGetAlignment(Text:textdrawid);
native TextDrawGetPreviewModel(Text:textdrawid);
native TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2);
// Textdraw - Player
native IsValidPlayerTextDraw(playeridPlayerText:textdrawid);
native IsPlayerTextDrawVisible(playeridPlayerText:textdrawid);
native PlayerTextDrawGetString(playeridPlayerText:textdrawidtext[], len sizeof(text));
native PlayerTextDrawSetPos(playeridPlayerText:textdrawidFloat:fXFloat:fY);
native PlayerTextDrawGetLetterSize(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetTextSize(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetPos(playeridPlayerText:textdrawid, &Float:fX, &Float:fY);
native PlayerTextDrawGetColor(playeridPlayerText:textdrawid);
native PlayerTextDrawGetBoxColor(playeridPlayerText:textdrawid);
native PlayerTextDrawGetBackgroundCol(playeridPlayerText:textdrawid);
native PlayerTextDrawGetShadow(playeridPlayerText:textdrawid);
native PlayerTextDrawGetOutline(playeridPlayerText:textdrawid);
native PlayerTextDrawGetFont(playeridPlayerText:textdrawid);
native PlayerTextDrawIsBox(playeridPlayerText:textdrawid);
native PlayerTextDrawIsProportional(playeridPlayerText:textdrawid);
native PlayerTextDrawIsSelectable(playeridPlayerText:textdrawid);
native PlayerTextDrawGetAlignment(playeridPlayerText:textdrawid);
native PlayerTextDrawGetPreviewModel(playeridPlayerText:textdrawid);
native PlayerTextDrawGetPreviewRot(playeridPlayerText:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
native PlayerTextDrawGetPreviewVehCol(playeridPlayerText:textdrawid, &color1, &color2);
// 3D Text - Global
native IsValid3DTextLabel(Text3D:id);
native Is3DTextLabelStreamedIn(playeridText3D:id);
native Get3DTextLabelText(Text3D:idtext[], len sizeof(text));
native Get3DTextLabelColor(Text3D:id);
native Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:Get3DTextLabelDrawDistance(Text3D:id);
native Get3DTextLabelLOS(Text3D:id);
native Get3DTextLabelVirtualWorld(Text3D:id);
native Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid);
// 3D Text - Player
native IsValidPlayer3DTextLabel(playeridPlayerText3D:id);
native GetPlayer3DTextLabelText(playeridPlayerText3D:idtext[], len sizeof(text));
native GetPlayer3DTextLabelColor(playeridPlayerText3D:id);
native GetPlayer3DTextLabelPos(playeridPlayerText3D:id, &Float:fX, &Float:fY, &Float:fZ);
native Float:GetPlayer3DTextLabelDrawDist(playeridPlayerText3D:id);
native GetPlayer3DTextLabelLOS(playeridPlayerText3D:id);
native GetPlayer3DTextLabelVirtualW(playeridPlayerText3D:id);
native GetPlayer3DTextLabelAttached(playeridPlayerText3D:id, &attached_playerid, &attached_vehicleid);
// Menu
native IsMenuDisabled(Menu:menuid);
native IsMenuRowDisabled(Menu:menuidrow);
native GetMenuColumns(Menu:menuid);
native GetMenuItems(Menu:menuidcolumn);
native GetMenuPos(Menu:menuid, &Float:fX, &Float:fY);
native GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2);
native GetMenuColumnHeader(Menu:menuidcolumnheader[], len sizeof(header));
native GetMenuItem(Menu:menuidcolumnitemiditem[], len sizeof(item));
// Pickups - Global
native IsValidPickup(pickupid);
native IsPickupStreamedIn(playeridpickupid);
native GetPickupPos(pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPickupModel(pickupid);
native GetPickupType(pickupid);
native GetPickupVirtualWorld(pickupid);
/*
// Pickups - Player
native CreatePlayerPickup(playerid, model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPlayerPickup(playerid, pickupid);
native IsValidPlayerPickup(playerid, pickupid);
native IsPlayerPickupStreamedIn(playerid, pickupid);
native GetPlayerPickupPos(playerid, pickupid, &Float:fX, &Float:fY, &Float:fZ);
native GetPlayerPickupModel(playerid, pickupid);
native GetPlayerPickupType(playerid, pickupid);
native GetPlayerPickupVirtualWorld(playerid, pickupid);
*/
// ******'s model sizes inc
native GetColCount();
native Float:GetColSphereRadius(modelid);
native GetColSphereOffset(modelid, &Float:fX, &Float:fY, &Float:fZ);
// Formatting
native SendClientMessagef(playeridcolor, const message[], {Float,_}:...);
native SendClientMessageToAllf(color, const message[], {Float,_}:...);
native GameTextForPlayerf(playeriddisplaytimestyle, const message[], {Float,_}:...);
native GameTextForAllf(displaytimestyle, const message[], {Float,_}:...);
native SendPlayerMessageToPlayerf(playeridsenderid, const message[], {Float,_}:...);
native SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...);
native SendRconCommandf(const command[], {Float,_}:...);
// Callbacks
forward OnPlayerEnterGangZone(playeridzoneid);
forward OnPlayerLeaveGangZone(playeridzoneid);
forward OnPlayerEnterPlayerGangZone(playeridzoneid);
forward OnPlayerLeavePlayerGangZone(playeridzoneid);
forward OnPlayerPickUpPlayerPickup(playeridpickupid);
forward OnPlayerPauseStateChange(playeridpausestate);
forward OnPlayerStatsAndWeaponsUpdate(playerid);
forward OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[]);
forward OnServerMessage(const msg[]);
forward OnPlayerClientGameInit(playerid, &usecjwalk, &limitglobalchat, &Float:globalchatradius, &Float:nametagdistance, &disableenterexits, &nametaglos, &manualvehengineandlights, &spawnsavailable, &shownametags, &showplayermarkers, &onfoot_rate, &incar_rate, &weapon_rate, &lacgompmode, &vehiclefriendlyfire);
forward OnOutcomeScmEvent(playeridissueridE_SCM_EVENT_TYPE:eventidvehicleidarg1arg2);
forward OnServerQueryInfo(addr[], hostname[51], gameMode[31], language[31]);
//////////////////////////////////////////////////////////////
// Fixes
//////////////////////////////////////////////////////////////
// No comment..
#if !defined IsValidVehicle
    
native IsValidVehicle(vehicleid);
#endif
#if !defined GetGravity
    
native Float:GetGravity();
#endif
native GetWeather();
native GetWeaponSlot(weaponid);
enum
{
    
BS_BOOL,
    
BS_CHAR,
    
BS_UNSIGNEDCHAR,
    
BS_SHORT,
    
BS_UNSIGNEDSHORT,
    
BS_INT,
    
BS_UNSIGNEDINT,
    
BS_FLOAT,
    
BS_STRING
};
// Developer functions
native SendRPC(playeridRPC, {Float,_}:...); // playerid == -1 -> broadcast
native SendData(playerid, {Float,_}:...); // playerid == -1 -> broadcast
/* EXAMPLE
CMD:pickup(playerid, params[])
{
    new
        Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    SendRPC(playerid, 95, // rpcid
        BS_INT, strval(params), // int - pickupid
        BS_INT, 1222,    // int - modelid
        BS_INT, 19,     // int   - type
        BS_FLOAT, X + 2.0,   // float
        BS_FLOAT, Y,     // float
        BS_FLOAT, Z);    // float
    return 1;
}
CMD:destroypickup(playerid, params[])
{
    SendRPC(playerid, 63, // rpcid
        BS_INT, strval(params));    // int - pickupid
    return 1;
}
*/ 
QUE PORRA Й ESSA?
Reply
#4

Код:
new CarregadoCam[MAX_PLAYERS];

public OnPlayerConnect( playerid )
{

CarregadoCam[playerid] = 0;

}


public OnPlayerCommandText(playerid,cmdtext[])
{    
if(!strcmp(cmdtext, "/carregar", true))
    {
if(Carregado[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "* Seu Caminhao ja estб carregado!");
// Resto do comando aqui
CarregadoCam[playerid] = 1;
}

    if(!strcmp(cmdtext, "/descarregar", true))
    {
if(CarregadoCam[playerid] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "* Seu Caminhгo nгo estб carregado!);
// oq vai dentro do comando de descarregar aqui...
CarregadoCam[playerid] = 0;
}
Essa й uma base, onde 0 - Caminhгo descarregado e 1- Caminhгo carregado
Reply
#5

Quote:
Originally Posted by DarkZin
Посмотреть сообщение
QUE PORRA Й ESSA?
kkkkkkkkkkkkkkkkkkkkkk rachei


Quote:
Originally Posted by iLordGG
Посмотреть сообщение
Код:
new CarregadoCam[MAX_PLAYERS];

public OnPlayerConnect( playerid )
{

CarregadoCam[playerid] = 0;

}


public OnPlayerCommandText(playerid,cmdtext[])
{    
if(!strcmp(cmdtext, "/carregar", true))
    {
if(Carregado[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFFF, "* Seu Caminhao ja estб carregado!");
// Resto do comando aqui
CarregadoCam[playerid] = 1;
}

    if(!strcmp(cmdtext, "/descarregar", true))
    {
if(CarregadoCam[playerid] == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "* Seu Caminhгo nгo estб carregado!);
// oq vai dentro do comando de descarregar aqui...
CarregadoCam[playerid] = 0;
}
Essa й uma base, onde 0 - Caminhгo descarregado e 1- Caminhгo carregado
Acho que ele quer verificar se o trailer estб no caminhгo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)