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



Help :) - Desha1 - 28.12.2014

Hello Guys.
i Want Example To Make CMD:Rob There 2 Pickups With This Way
CreateDynamicPickup
Ok Now i Want if im in This Pickup 1 i Get Random Money 10K And im in Pickup 2 Give Me Random 10k
With any pickups ids only i want example
+Rep For Helping me


Re: Help :) - UltraScripter - 28.12.2014

On PlayerPickupPickup


pawn Код:
if(pickupid == pickup1)
{
    GivePlayerMoney(playerid, 10000);
}
if(pickupid == pickup2)
{
    GivePlayerMoney(playerid, 10000);
}



Re: Help :) - Desha1 - 28.12.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
On PlayerPickupPickup


pawn Код:
if(pickupid == pickup1)
{
    GivePlayerMoney(playerid, 10000);
}
if(pickupid == pickup2)
{
    GivePlayerMoney(playerid, 10000);
}
Sorry
But Where i Can Paste My Pos Pickups ?
And The CMD:Rob


Re: Help :) - UltraScripter - 28.12.2014

OnGameModeInit


Re: Help :) - Desha1 - 28.12.2014

how to make it in CMD:Rob
and when im done take it Disapear this pickup i done take it


Re: Help :) - UltraScripter - 28.12.2014

Hare :

pawn Код:
CMD:rob(playerid, params[]) //rob with little letter not big else it wont WOrk!
{
    if(IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z)) //type hare the checkpoint position the 2.5 is range!
    {
        DestroyCheckpoint(Pickup1);
    }
    else
    {
         SendClientMessage(playerid, 0xFF0000FF, "You Are Not In The Pickup Place!");
    }
}
return 1;
}



Re: Help :) - AndySedeyn - 28.12.2014

Quote:
Originally Posted by UltraScripter
Посмотреть сообщение
Hare :

pawn Код:
CMD:rob(playerid, params[]) //rob with little letter not big else it wont WOrk!
{
    if(IsPlayerInRangeOfPoint(playerid, 2.5, x, y, z)) //type hare the checkpoint position the 2.5 is range!
    {
        DestroyCheckpoint(Pickup1);
    }
    else
    {
         SendClientMessage(playerid, 0xFF0000FF, "You Are Not In The Pickup Place!");
    }
}
return 1;
}
That piece of code will not work at all.
It will return
Код:
warning 209: function "cmd_rob" should return a value
Remove the closing bracket before the return 1.


Re: Help :) - UltraScripter - 28.12.2014

Ohh yeah my mistake sorry didn't notice


Re: Help :) - Desha1 - 28.12.2014

i Mean When This Pickups Not Showing
When i Write CMD:rob
the Pickups Showing
And after i Take it Disapear
Quote:

pickup1 = CreateDynamicPickup(1274, 1, 1966.5988,1029.6251,992.4745,0);
pickup2 = CreateDynamicPickup(1212, 1, 1966.6005,1021.6895,992.4688,0);




Re: Help :) - UltraScripter - 28.12.2014

pawn Код:
CMD:rob(playerid, params[])
{
      //and adding ur pickups hare
      //And hare the second
      return 1;
}