03.06.2012, 20:03
Well i have been trying so hard and no one seems to want to help me
Pretty much i have made the boot open of the back of my car an everything but i just cant figure out howt o make it so you can store weapons in there or nothing and then take them back out I really need this in my script, I would love if someone could help me please!
Please help me!
This is in PlayerStats Enum
This is on save player data
This is my command to open the boot please help me
Please im begging i really need to know how to store weapons in my boot and take them out if you need any more code just ask please
Help Is Really Really Appreciated
Pretty much i have made the boot open of the back of my car an everything but i just cant figure out howt o make it so you can store weapons in there or nothing and then take them back out I really need this in my script, I would love if someone could help me please!
Please help me!
This is in PlayerStats Enum
pawn Код:
CarWeapon1,
CarWeapon2,
CarWeapon3,
pawn Код:
dini_IntSet(string, "CarWeapon1", Player[playerid][CarWeapon1]);
dini_IntSet(string, "CarWeapon2", Player[playerid][CarWeapon2]);
dini_IntSet(string, "CarWeapon3", Player[playerid][CarWeapon3]);
pawn Код:
command(carboot, playerid, params[])
{
new engine, lights, alarm, doors, bonnet, boot, objective, string[128];
if(IsPlayerNearBoot( playerid, Player[playerid][CarLinkID]))
{
if(Player[playerid][CarBootOpen] == 0)
{
GetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, doors, bonnet, boot, objective);
Player[playerid][CarBootOpen] = 1;
SetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, doors, bonnet, 1, 0);
format(string, sizeof(string), "%s has opened their boot of their car", GetNameNoUnderScore(playerid));
NearByMessage(playerid, PURPLE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Your boot is already open");
}
}
if(IsPlayerNearBoot( playerid, Player[playerid][Car2LinkID]))
{
if(Player[playerid][Car2BootOpen] == 0)
{
GetVehicleParamsEx(Player[playerid][Car2LinkID], engine, lights, alarm, doors, bonnet, boot, objective);
Player[playerid][Car2BootOpen] = 1;
SetVehicleParamsEx(Player[playerid][Car2LinkID], engine, lights, alarm, doors, bonnet, 1, 0);
format(string, sizeof(string), "%s has opened their boot of their car", GetNameNoUnderScore(playerid));
NearByMessage(playerid, PURPLE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Your boot is already open");
}
}
if(IsPlayerNearBoot( playerid, Player[playerid][Car3LinkID]))
{
if(Player[playerid][Car3BootOpen] == 0)
{
GetVehicleParamsEx(Player[playerid][Car3LinkID], engine, lights, alarm, doors, bonnet, boot, objective);
Player[playerid][Car3BootOpen] = 1;
SetVehicleParamsEx(Player[playerid][Car3LinkID], engine, lights, alarm, doors, bonnet, 1, 0);
format(string, sizeof(string), "%s has opened their boot of their car", GetNameNoUnderScore(playerid));
NearByMessage(playerid, PURPLE, string);
}
else
{
SendClientMessage(playerid, WHITE, "Your boot is already open");
}
}
}
Help Is Really Really Appreciated