Pickup Problem
#1

i dont know what to do! when the player pickup the shop , the player is teleporting to the ground


here's the image





Reply
#2

Where is the picture?
Reply
#3

Reply
#4

Show the Pickup code
Reply
#5

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
Show the Pickup code
PHP код:
public OnPlayerPickUpDynamicPickup(playeridpickupid)
{
    for(new 
i!= sizeof(gShop); i++)
    {
        if(
pickupid == gShop[i][SHOP_PICKUP])
        {
            if(
GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playeridCOLOR_FIREBRICK"ERROR: You cannot pickup this right now.");
            if(    
gShop[i][SHOP_TEAM] != NO_TEAM &&
                
GetPlayerTeam(playerid) != gShop[i][SHOP_TEAM])
            {
                return 
SendClientMessage(playeridCOLOR_FIREBRICK"ERROR: You can't open enemies' shop!");
            }
            
//dialog check
            
if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
            return 
ShowPlayerShopDialog(playerid);
        }
    }
    return 
1;
}
ShowPlayerShopDialog(playerid)
{
    new 
dialogstr[556];
    
strcat(dialogstr""SAMP_BLUE"Full Health ($2500)\n");
    
strcat(dialogstr""SAMP_BLUE"Full Armour ($2500)\n");
    
strcat(dialogstr""CORAL"- Weapons List\n");
    
strcat(dialogstr""CORAL"- Misc. Items\n");
    
strcat(dialogstr""CORAL"- Inventory Items");
    return 
ShowPlayerDialog(playeridDIALOG_SHOPDIALOG_STYLE_LIST"Shop!"dialogstr"Select""Close");

Reply
#6

Quote:
Originally Posted by Hemeei
Посмотреть сообщение
PHP код:
public OnPlayerPickUpDynamicPickup(playeridpickupid)
{
    for(new 
i!= sizeof(gShop); i++)
    {
        if(
pickupid == gShop[i][SHOP_PICKUP])
        {
            if(
GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playeridCOLOR_FIREBRICK"ERROR: You cannot pickup this right now.");
            if(    
gShop[i][SHOP_TEAM] != NO_TEAM &&
                
GetPlayerTeam(playerid) != gShop[i][SHOP_TEAM])
            {
                return 
SendClientMessage(playeridCOLOR_FIREBRICK"ERROR: You can't open enemies' shop!");
            }
            
//dialog check
            
if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
            return 
ShowPlayerShopDialog(playerid);
        }
    }
    return 
1;
}
ShowPlayerShopDialog(playerid)
{
    new 
dialogstr[556];
    
strcat(dialogstr""SAMP_BLUE"Full Health ($2500)\n");
    
strcat(dialogstr""SAMP_BLUE"Full Armour ($2500)\n");
    
strcat(dialogstr""CORAL"- Weapons List\n");
    
strcat(dialogstr""CORAL"- Misc. Items\n");
    
strcat(dialogstr""CORAL"- Inventory Items");
    return 
ShowPlayerDialog(playeridDIALOG_SHOPDIALOG_STYLE_LIST"Shop!"dialogstr"Select""Close");

Try with no interior
Reply
#7

Quote:
Originally Posted by SoFahim
Посмотреть сообщение
Try with no interior
did you change something ?
Reply
#8

No. I din't . just try to put that pickup in a normal place. Not in interior
Reply
#9

Most likely (if coordinates of teleportation point are right), objects of your interior can't manage to load for player in time which causes him to fall down. Try to set Z coordinate to "Z_value + 1" (or even 2) in SetPlayerPos function.
In case if you cant even see objects of your interior, check whether they are created and then double check the correctness of coordinates where a player is to be teleported to.
Reply
#10

why not make a shop? when he pickup he gonna teleport to the ground make shop on the ground then when he gonna Go , you gonna teleport him again to the building
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)