Help Me With Pickup
#1

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
Reply
#2

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;
}
Reply
#3

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

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.
Reply
#5

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
Reply
#6

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?
Reply
#7

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
Reply
#8

Код:
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
Reply
#9

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
Reply
#10

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)