Pickup Script help Rep+
#1

How i can make this in my server when you get healt or armour to get money
Reply
#2

First of all , You have to Add at the Top ,
PHP код:
new health
, Then , Under ongamemodeinit , Add :
PHP код:
health CreateDynamicPickup(1240X,Y,Z,VW); // Replace the X Y Z VW with Your Cordinates and Virtural World 
- Now. under OnPlayerPickupPickup , Add :

PHP код:
    if(pickupid == health)
    {
            
SetPlayerHealth(playerid,100);
        
GivePlayerMoney(playerid,-1000);
        
SendClientMessage(playerid,COLOR,"You have Bought Health");
        return 
1;
    } 
And you are done
Reply
#3

Thank you i give you Rep
Reply
#4

Quote:
Originally Posted by Breto
Посмотреть сообщение
First of all , You have to Add at the Top ,
PHP код:
new health
, Then , Under ongamemodeinit , Add :
PHP код:
health CreateDynamicPickup(1240X,Y,Z,VW); // Replace the X Y Z VW with Your Cordinates and Virtural World 
- Now. under OnPlayerPickupPickup , Add :

PHP код:
    if(pickupid == health)
    {
            
SetPlayerHealth(playerid,100);
        
GivePlayerMoney(playerid,-1000);
        
SendClientMessage(playerid,COLOR,"You have Bought Health");
        return 
1;
    } 
And you are done
Even though, it will work even if the player has - 120120210 money... You also need to check if the player's money is more than 1000.

pawn Код:
if(pickupid == health)
    {
            if (GetPlayerMoney(playerid) < 1000)
            {
                SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid,-1000);
                SendClientMessage(playerid,COLOR,"You have Bought Health");
            }
            return 1;
    }
Reply
#5

Thank you king_hual Rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)