SA-MP Forums Archive
Help Me With Pickup - 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)
+--- Thread: Help Me With Pickup (/showthread.php?tid=540145)



Help Me With Pickup - astanalol00 - 03.10.2014

Hello Guys
i Want Know How To Make 3 Pickup All This Pickup id 1212
With Command Rob
When i Get 1 i Take Random Money 1 to 1000 with time 45sec after that start or i done 3 pickup start otmatic
please help +rep


Re: Help Me With Pickup - JJack - 03.10.2014

AddStaticPickup = To create the pickup
You'll need ZCMD include.
Код:
forward Money();
public Money()
{
    new string[128], moneyamount = 1 + random(1000); 
    GivePlayerMoney(playerid, moneyamount); 
    format(string, sizeof(string), "You have robbed $%i.", moneyamount);
    SendClientMessage(playerid, 0xFFFFFFF, string);
    return 1;
}
Place this after the OnPlayerCommandText or anywhere.

Код:
CMD:rob(playerid, params[]) 
{
    SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
    GameTextForPlayer(playerid, "Robbing", 4500, 3);
    return 1;
}



Re: Help Me With Pickup - astanalol00 - 03.10.2014

but this not there 3 pickup i write it when i robing 1 pickup get money
please example +rep


Re: Help Me With Pickup - JJack - 03.10.2014

Don't add the pickups in that code..
Just add 3 pickups under "OnGameModeInit"
for example:
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );

Also after you add the coordinates for the /rob command you need to add the coordinates where you want it to work.


Re: Help Me With Pickup - astanalol00 - 03.10.2014

not working i want making only 3 pickup when i goto to 1 get money 1000 and when i goto to 2 i get money 2000 when i get 3 get money 3000


Re: Help Me With Pickup - JJack - 03.10.2014

Quote:
Originally Posted by astanalol00
Посмотреть сообщение
not working i want making only 3 pickup when i goto to 1 get money 1000 and when i goto to 2 i get money 2000 when i get 3 get money 3000
Well you didnt say that in the first place... so basically you want when you go to the pickups you get the money or by using a command?


Re: Help Me With Pickup - astanalol00 - 03.10.2014

with Command Showing 3 Pickups And When i Robing 1 Pickups Get Random Money 2000
And 2 Pickups Get Random 2000 And 3 Pickups Get Random 2000
that all


Re: Help Me With Pickup - JJack - 03.10.2014

Код:
forward MoneyPickup1();
public MoneyPickup1()
{
    new string[128], moneyamount = 1000); 
    GivePlayerMoney(playerid, moneyamount); 
    format(string, sizeof(string), "You have robbed $%i.", moneyamount);
    SendClientMessage(playerid, 0xFFFFFFF, string);
    return 1;
}
Place this after the OnPlayerCommandText or anywhere.

Код:
CMD:robpickup1(playerid, params[]) 
{
    SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
    GameTextForPlayer(playerid, "Robbing", 4500, 3);
    return 1;
}
For Pickup 2
Код:
forward MoneyPickup2();
public MoneyPickup2()
{
    new string[128], moneyamount = 2000); 
    GivePlayerMoney(playerid, moneyamount); 
    format(string, sizeof(string), "You have robbed $%i.", moneyamount);
    SendClientMessage(playerid, 0xFFFFFFF, string);
    return 1;
}
Place this after the OnPlayerCommandText or anywhere.

Код:
CMD:robpickup2(playerid, params[]) 
{
    SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
    GameTextForPlayer(playerid, "Robbing", 4500, 3);
    return 1;
}
For pickup3

Код:
forward MoneyPickup3();
public MoneyPickup3()
{
    new string[128], moneyamount = 3000); 
    GivePlayerMoney(playerid, moneyamount); 
    format(string, sizeof(string), "You have robbed $%i.", moneyamount);
    SendClientMessage(playerid, 0xFFFFFFF, string);
    return 1;
}
Place this after the OnPlayerCommandText or anywhere.

Код:
CMD:robpickup3(playerid, params[]) 
{
    SetTimerEx("RobbingSystem", 45000, false, "i", playerid);
    GameTextForPlayer(playerid, "Robbing", 4500, 3);
    return 1;
}
All you need to do is to create this three pickups
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
AddStaticPickup(1212, "Here add the coordinates where you want the Pickup to be created" );
To take the coordinates use /save

And you will need to set the coordinates where you want the command to be used.
if(IsPlayerInRangeOfPoint(playerid, "Here add the coordinate where you want the command to be used" );
Its too simple if you still cant understand it check this link:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: Help Me With Pickup - astanalol00 - 03.10.2014

sorry its my problem 3 pickups in 1 command
any way i give u +rep
but i still need 3 pickups in 1 command and when i robing 1 pickups get random money 2000


Re: Help Me With Pickup - JJack - 03.10.2014

Quote:
Originally Posted by astanalol00
Посмотреть сообщение
sorry its my problem 3 pickups in 1 command
any way i give u +rep
but i still need 3 pickups in 1 command and when i robing 1 pickups get random money 2000
Well you can't even give +rep because you don't have 50 posts but anyways I don't care I just wanna help others.

On-Topic: You can't use 1 command for 3 different things... Also explain more...