PDA

View Full Version : How to make a job to "pickup" something?


Kapone21
15/07/2013, 11:14 PM
How can i make a job like that:
https://www.youtube.com/watch?v=iGk4ZKIzVYQ
Who can give me the "command" attach to make you to have hands up and pickup a.... rock for example or something ! :( pleasee! say

ScRipTeRi
16/07/2013, 12:29 AM
#include <a_samp>

#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_YELLOW 0xFFFF00AA
new Mission;

public OnGameModeInit()
{
AddPlayerClass(27,-2150.6367,-253.2075,36.5156,267.7855,0,0,0,0,0,0); // player
Mission = CreatePickup(1318, 3, -2144.1028,-252.6388,36.5156);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Mission)
SendClientMessage(playerid, COLOR_WHITE, "Ati ridicat un sac. Il duceti acum in depozit!");
SetPlayerCheckpoint(playerid, -2176.0100,-233.9219,36.5220, 1.0);
ApplyAnimation(playerid,"CARRY","crry_prtial",4.1,1,0,0,1,1);
SetPlayerAttachedObject( playerid, 0, 1220, 1, -0.064613, 0.520760, 0.000000, 0.000000, 84.217391, 0.000000, 1.000000, 1.000000, 1.000000 );
DestroyPickup(playerid);
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_YELLOW, "Ati adus scaul in depozit! Va intoreceti dupa unmatoru!!");
RemovePlayerAttachedObject(playerid, playerid);
Mission = CreatePickup(1318, 3, -2144.1028,-252.6388,36.5156);
return 1;
}

Isolated
16/07/2013, 12:37 AM
what's wrong with that code

ScRipTeRi
16/07/2013, 12:46 AM
anythink