Truckers problem
#1

Ok, i made this script.

The problem is the pickup doesn't shows up at Big Smoke factory when you pick up the car and is SUPPOSED TO BE created, but the pickup ain't there.

Also, is there a way to make a pickup that only a certain player can see?

pawn Code:
if(newstate == PLAYER_STATE_DRIVER && vehicle == bscar1 || newstate == PLAYER_STATE_DRIVER && vehicle == bscar2 || newstate == PLAYER_STATE_DRIVER && vehicle == bscar3 || newstate == PLAYER_STATE_DRIVER && vehicle == bscar4 || newstate == PLAYER_STATE_DRIVER && vehicle == bscar5)
    {
    if(PlayerData[playerid][illegaljob] == 0)
    {
    SendClientMessage(playerid,GREEN, "You find the vehicle with the keys inside and you turn it on.");
    SendClientMessage(playerid,YELLOW, " Head to Big Smoke's Drug Factory at San Fierro to load the drugs up.");
    SendClientMessage(playerid,RED, " Try to avoid any attention, especially the police one.");
    SetVehicleParamsEx(vehicle,1,1,0,0,0,0,0);
    bspickup1 = CreatePickup(1318,2,-2142.6155,-243.7579,36.5156,-1);
    DestroyPickup(rdpickup1);
    DestroyPickup(rdpickup2);
    return 1;
    }
    else if(PlayerData[playerid][illegaljob] == 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,RED, "* You have made an illegal-job recently, you need to wait more time before trying to do this job!");
    SetVehicleParamsEx(vehicle,0,0,0,0,0,0,0);
    return 1;
    }
    else if(PlayerData[playerid][loaded] == 1)
    {
    SendClientMessage(playerid,RED, "* You're loaded with the drugs, now head to East Los Santos Car Wash to unload them.");
    SetVehicleParamsEx(vehicle,1,1,0,0,0,0,0);
    return 1;
    }
}

    if(newstate == PLAYER_STATE_DRIVER && vehicle == rdcar1 || newstate == PLAYER_STATE_DRIVER && vehicle == rdcar2 || newstate == PLAYER_STATE_DRIVER && vehicle == rdcar3 || newstate == PLAYER_STATE_DRIVER && vehicle == rdcar4 || newstate == PLAYER_STATE_DRIVER && vehicle == rdcar5)
    {
    if(PlayerData[playerid][illegaljob] == 0)
    {
    SendClientMessage(playerid,GREEN, "The vehicle keys are inside, so you spin them and turn on the vehicle.");
    SendClientMessage(playerid,YELLOW, " Head to The Truth's farm to load the drugs up.");
    SendClientMessage(playerid,RED, " Try to avoid any attention, especially the police one.");
    SetVehicleParamsEx(vehicle,1,1,0,0,0,0,0);
    rdpickup1 = CreatePickup(1318,2,-1111.3093,-1677.3430,76.3672,-1);
    DestroyPickup(bspickup1);
    DestroyPickup(bspickup2);
    return 1;
    }
    else if(PlayerData[playerid][illegaljob] == 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,RED, "* You have made an illegal-job recently, you need to wait more time before trying to do this job!");
    SetVehicleParamsEx(vehicle,0,0,0,0,0,0,0);
    return 1;
    }
    else if(PlayerData[playerid][loaded] == 1)
    {
    SendClientMessage(playerid,RED, "* You're loaded with the drugs, now head to East Los Santos Warehouse to unload them.");
    SetVehicleParamsEx(vehicle,1,1,0,0,0,0,0);
    return 1;
    }
}

if(pickupid == rdpickup1 && PlayerData[playerid][loaded] == 0)
    {
    SetPlayerAttachedObject(playerid, 2, 1575,7, 0.389999, 0.019999, -0.220000, 0.000000, 1.000000, 0.000000); // drug bag 1
    SetPlayerAttachedObject(playerid, 3, 1575,8, 0.419999, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000); // drug bag 2
    SendClientMessage(playerid,YELLOW,"* You've loaded the drugs, head to East Los Santos Warehouse to unload them up and get the money.");
    SendClientMessage(playerid,GREEN,"* You have got drug bags around you, try not to being seen by the police.");
    rdpickup2 = CreatePickup(1318,2,2413.5742,-1425.0460,23.9831,-1);
    PlayerData[playerid][loaded] = 1;
    DestroyPickup(rdpickup1);
    DestroyPickup(bspickup1);
    DestroyPickup(bspickup2);
   
    return 1;
    }
    if(pickupid == rdpickup1 && PlayerData[playerid][loaded] == 1)
    {
    SendClientMessage(playerid,RED," You're already loaded with drugs, go unload them at East Los Santos Car Wash.");
    return 1;
    }


    if(pickupid == bspickup1 && PlayerData[playerid][loaded] == 0)
    {
    SetPlayerAttachedObject(playerid, 2, 1575,7, 0.389999, 0.019999, -0.220000, 0.000000, 1.000000, 0.000000); // drug bag 1
    SetPlayerAttachedObject(playerid, 3, 1575,8, 0.419999, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000); // drug bag 2
    SendClientMessage(playerid,YELLOW,"* You've loaded the drugs, head to East Los Santos Car Wash to unload them up and get the money.");
    SendClientMessage(playerid,GREEN,"* You have got drug bags around you, try not to being seen by the police.");
    bspickup2 = CreatePickup(1318,2,2509.6816,-1469.2946,24.0281,-1);
    PlayerData[playerid][loaded] = 1;
    DestroyPickup(bspickup1);
    DestroyPickup(rdpickup1);
    DestroyPickup(rdpickup2);
    return 1;
    }
    if(pickupid == bspickup1 && PlayerData[playerid][loaded] == 1)
    {
    SendClientMessage(playerid,RED," You're already loaded with drugs, go unload them at East Los Santos Car Wash.");
    return 1;
    }

   
    if(pickupid == bspickup2)
    {
    RemovePlayerAttachedObject(playerid,2);
    RemovePlayerAttachedObject(playerid,3);
    SendClientMessage(playerid,GREEN,"* You unloaded the drugs and got the money.");
    SendClientMessage(playerid,RED,"* You need to wait a time before doing the job again, now leave the scene!");
    GivePlayerMoney(playerid, 2500);
    PlayerData[playerid][illegaljob] = 1;
    SetTimer("illegaljob", 1000*10800, false); // Set a timer of 1000 miliseconds (1 second)
    DestroyPickup(rdpickup1);
    DestroyPickup(rdpickup2);
    DestroyPickup(bspickup1);
    DestroyPickup(bspickup2);
    return 1;
    }
   
   
    if(pickupid == rdpickup2)
    {
    RemovePlayerAttachedObject(playerid,2);
    RemovePlayerAttachedObject(playerid,3);
    SendClientMessage(playerid,GREEN,"* You unloaded the drugs and got the money.");
    SendClientMessage(playerid,RED,"* You need to wait a time before doing the job again, now leave the scene!");
    GivePlayerMoney(playerid, 900);
    PlayerData[playerid][illegaljob] = 1;
    SetTimer("illegaljob", 1000*2700, false); // Set a timer of 1000 miliseconds (1 second)
    DestroyPickup(rdpickup1);
    DestroyPickup(rdpickup2);
    DestroyPickup(bspickup1);
    DestroyPickup(bspickup2);
    return 1;
    }
Reply
#2

bump
Reply
#3

use this : https://sampforum.blast.hk/showthread.php?tid=12909
that might help you
(that contain : pickup that would be seen only for 1 player and pickup that would seen to all)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)