Jump to content

bogdyutzu

Members
  • Posts

    4
  • Joined

  • Last visited

Details

  • Gang
    left

bogdyutzu's Achievements

Vic

Vic (3/54)

0

Reputation

  1. The source is the colshape...
  2. Hello, I have a problem with bindKey. I've tried to bind a player (client-side) when enter in colshape (also client-side) and unbind the player when he leave the colshape. But the problem is bindKey because is bind all players. This is the code: function onClientColShapeHit(element) if element == localPlayer then bindKey("mouse2", "up", onClientExitProp, getElementData(source, "pickup")) end end function onClientColShapeLeave(element) if element == localPlayer then unbindKey("mouse2", "up") end end
  3. bogdyutzu

    Headmove

    Add headmove to players. When they move the camera the head move to.
  4. Hello, I scripted a long time in Pawn for SA:MP and some days ago I deiced to migrate to MTA:SA. I need some help to understand the Lua. I already searched tutorials but I not fully understand. In Pawn I was using this code for an array for player: enum _:E_MAX_PLAYER_BITS { bitsIsDead = 1, // insted of bool (true and false) ... }; enum _:E_PLAYER_DATA { // the 0 of this array is used for bits intAdminLevel = 1, ... } new g_PlayerFlags[MAX_PLAYERS][E_PLAYER_DATA] #define BitCheck(%0,%1,%2) !! ( ( %0[ %2 ][ 0 ] ) & ( 1 << %1 ) ) #define BitSet(%0,%1,%2,%3) ( (_:%3) && ( ( %0[ %2 ][ 0 ] ) |= ( 1 << %1 ) ) || ( ( %0[ %2 ] [ 0 ] ) &= ~( 1 << %1 ) ) ) public OnPlayerConnect(playerid) { g_PlayerFlags[playerid][intAdminLevel] = 3; return 1; } public OnPlayerDeath(playerid, killerid, reason) { BitSet(g_PlayerFlags, bitsIsDead, playerid, true); // if is posibile to use bit else true or false, is just an example... return 1; } public OnPlayerStreamIn(playerid, forplayerid) { static intNumber= 1; // Static is a constat value that remain evry time we call OnPlayerStreamIn prinf("Player have %d %d", BitCheck(g_PlayerFlags, bitsIsDead, playerid), intNumber) // Actualy return int 0/false or 1/true } I need some explications about how to convert this from pawn to lua, if is posible to use bits insted of true or false, explain the client scripting and the server scripting better.
×
×
  • Create New...