Pickup help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pickup help (
/showthread.php?tid=237178)
Pickup help -
Sepelin - 09.03.2011
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(cmdtext, idx);
if(!strlen(x_nr))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /adjust safe [confirm]");
if(FamilyInfo[family][FamilySafe] != 0)
{
SendClientMessage(playerid, COLOR_GREY," Adjusting the position of your Family's Safe will cost $50,000 !");
SendClientMessage(playerid, COLOR_WHITE,"HINT: Adjusting the position of your Family's Safe will remove its contents.");
}
else
{
SendClientMessage(playerid, COLOR_GREY," Purchasing a Safe for your Family will cost $50,000 !");
SendClientMessage(playerid, COLOR_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(playerid, COLOR_GRAD1, " You don't have that much money !");
return 1;
}
if(FamilyInfo[family][FamilySafe] != 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have adjusted the position of your Family's Safe.");
}
else
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You have purchased a Safe.");
SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /safehelp for more information.");
}
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash]-50000;
GivePlayerMoney(playerid,-50000);
GetPlayerPos(playerid, FamilyInfo[family][FamilySafePos][0],FamilyInfo[family][FamilySafePos][1],FamilyInfo[family][FamilySafePos][2]);
DestroyPickup(FamilyInfo[family][PickupID]);
FamilyInfo[family][PickupID] = CreatePickup(1210, 23, FamilyInfo[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;
}
}
Re: Pickup help -
wheelman_WM - 09.03.2011
I didnt understand what u want ?
Re: Pickup help -
Sepelin - 09.03.2011
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
Re: Pickup help -
Sepelin - 09.03.2011
Nevermind i fixed it
Re: Pickup help -
wheelman_WM - 09.03.2011
Use CreatePickup (id, 2,Location)