Pickup help
#1

When i use this command it wont delete the old pickup it removes another random pickup
and its text and add it where i spawned my pickup

Like this the random pickup is outside CJ's house and if you are in range of the pickup it shows
CJ's House on the screen

when i spawn my family safe it moves the pickup outside CJ's house to the location i want to spawn my safe

could someone help me. heres the code:


PHP код:
else if(strcmp(x_nr,"safe",true) == 0)
                {
                    
x_nr strtok(cmdtextidx);
                    if(!
strlen(x_nr))
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"USAGE: /adjust safe [confirm]");
                        if(
FamilyInfo[family][FamilySafe] != 0)
                        {
                            
SendClientMessage(playeridCOLOR_GREY,"   Adjusting the position of your Family's Safe will cost $50,000 !");
                            
SendClientMessage(playeridCOLOR_WHITE,"HINT: Adjusting the position of your Family's Safe will remove its contents.");
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_GREY,"   Purchasing a Safe for your Family will cost $50,000 !");
                            
SendClientMessage(playeridCOLOR_WHITE,"HINT: Purchasing a Safe will give your Family the ability to store/share Pot, Crack, Cash and Materials.");
                        }
                        return 
1;
                    }
                    if(
strcmp(x_nr,"confirm",true) == 0)
                    {
                        if(
PlayerInfo[playerid][pCash] < 49999)
                        {
                            
SendClientMessage(playeridCOLOR_GRAD1"   You don't have that much money !");
                            return 
1;
                        }
                        if(
FamilyInfo[family][FamilySafe] != 0)
                        {
                            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* You have adjusted the position of your Family's Safe.");
                        }
                        else
                        {
                            
SendClientMessage(playeridCOLOR_LIGHTBLUE"* You have purchased a Safe.");
                            
SendClientMessage(playeridCOLOR_WHITE"HINT: Type /safehelp for more information.");
                        }
                        
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-50000;
                        
GivePlayerMoney(playerid,-50000);
                        
GetPlayerPos(playeridFamilyInfo[family][FamilySafePos][0],FamilyInfo[family][FamilySafePos][1],FamilyInfo[family][FamilySafePos][2]);
                        
DestroyPickup(FamilyInfo[family][PickupID]);
                        
FamilyInfo[family][PickupID] = CreatePickup(121023FamilyInfo[family][FamilySafePos][0],FamilyInfo[family][FamilySafePos][1], FamilyInfo[family][FamilySafePos][2], -1);
                        
FamilyInfo[family][FamilySafe] = 1;
                        
FamilyInfo[family][FamilyCash] = 0;
                        
FamilyInfo[family][FamilyPot] = 0;
                        
FamilyInfo[family][FamilyCrack] = 0;
                        
FamilyInfo[family][FamilyMats] = 0;
                        
SaveFamilies();
                        return 
1;
                    }
                } 
Reply
#2

I didnt understand what u want ?
Reply
#3

Quote:
Originally Posted by wheelman_WM
Посмотреть сообщение
I didnt understand what u want ?
Only want it to destroy the safe pickup instead of a random pickup
Reply
#4

Nevermind i fixed it
Reply
#5

Use CreatePickup (id, 2,Location)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)