Can someone help?
#1

Hi guys.
Can someone help me with a /fixmycar command?
For example it should have it's coordinates from where to fix it, adn you go to the coordinates and type /fixmycar and it freezes you for 10 seconds, and it repairs your car with a price of probably 1k dollars.
If someone can help thanks a lot
Reply
#2

Coordinates mean checkpoint? if yes, check this Here
For Freezing Here
and for timer Here
and for repairing vehicle Here

pawn Code:
Pay(playerid, Cash)
{
      //Change this to what your server uses.
    pInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + Cash;
}
to call it

pawn Code:
//this will deduct cash to player
Pay(playerid, -amount);
//this will give cash to player
Pay(playerid, +amount);
Reply
#3

Quote:
Originally Posted by Shadow0707
View Post
Coordinates mean checkpoint? if yes, check this Here
For Freezing Here
and for timer Here
and for repairing vehicle Here

pawn Code:
Pay(playerid, Cash)
{
      //Change this to what your server uses.
    pInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + Cash;
}
to call it

pawn Code:
//this will deduct cash to player
Pay(playerid, -amount);
//this will give cash to player
Pay(playerid, +amount);
You didn't give him the full stuff to do it + the callbacks you gave him may not suit his enums (if he even has enums).
For a starter, just use
pawn Code:
GivePlayerMoney(playerid, amount);
amount can be negative

You may need the following:
https://sampwiki.blast.hk/wiki/GetPlayerDistanceFromPoint
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Quote:

and for repairing vehicle Here
If you want to fix the car and / or cosmetic damage (including the state of the tires), you will also need:
https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)