04.04.2016, 12:42
Hello there,
I currently have a shop system and I would like to change it so instead of having to walk into the pickup to enter the store, you could press the [F] button to enter it.
My current code is
Help would be appreciated
I currently have a shop system and I would like to change it so instead of having to walk into the pickup to enter the store, you could press the [F] button to enter it.
My current code is
Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid) { new arr[2]; Streamer_GetArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, arr); if(arr[0] == ENEX_STREAMER_IDENTIFIER) { if((gettime() - DelayTick[playerid]) < 3) return 1; if(pickupid == storeData[arr[1]][entCP]) { DelayTick[playerid] = gettime(); SetPlayerVirtualWorld(playerid, storeData[arr[1]][virtualID]); SetPlayerInterior(playerid, storeData[arr[1]][interiorID]); SetPlayerPos(playerid, storeData[arr[1]][extPos][0], storeData[arr[1]][extPos][1], storeData[arr[1]][extPos][2]); SetPlayerFacingAngle(playerid, storeData[arr[1]][extPos][3]); SetCameraBehindPlayer(playerid); } if(pickupid == storeData[arr[1]][extCP]) { DelayTick[playerid] = gettime(); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetPlayerPos(playerid, storeData[arr[1]][entPos][0], storeData[arr[1]][entPos][1], storeData[arr[1]][entPos][2]); SetPlayerFacingAngle(playerid, storeData[arr[1]][entPos][3]); SetCameraBehindPlayer(playerid); } } return true; }