HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Trynda - 16.05.2014
When i ENTER to my car and type /detain the suspect should be put at the PASSENGER SEAT
Then it wont, Then when i enter the car as a passenger it will work (wtf) how do i fix it!!!
Here are some pics
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Trynda - 16.05.2014
NUUUUUUUUUUuboDy>?
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Dignity - 16.05.2014
What is your code?
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
saikumar - 16.05.2014
Can u show us the codes please?
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
rockhopper - 16.05.2014
Yes Codes Plz
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Trynda - 17.05.2014
OMG IM A DUMB!!! I FORGOT TO PUT THE CODESSSSSSSSSSSSSSSSSSSS OGM OMG
GG
pawn Код:
CMD:detain(playerid, params[])
{
if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2)
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle.");
return 1;
}
new string[128], giveplayerid, seat;
if(sscanf(params, "ud", giveplayerid, seat)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /detain [playerid/partofname] [seatid 1-3]");
if(IsPlayerConnected(giveplayerid))
{
if(seat < 1 || seat > 3)
{
SendClientMessage(playerid, COLOR_GRAD1, "The seat ID can't be above 3 or below 1.");
return 1;
}
if(IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, "You can't detain other law enforcement officers.");
return 1;
}
if(IsPlayerInAnyVehicle(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, "That person is in a car - get them out first.");
return 1;
}
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You can't detain yourself!"); return 1; }
if(PlayerCuffed[giveplayerid] == 2)
{
new carid = gLastCar[playerid];
if(IsSeatAvailable(carid, seat))
{
new Float:pos[6];
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerPos(giveplayerid, pos[3], pos[4], pos[5]);
GetVehiclePos(carid, pos[0], pos[1], pos[2]);
if(floatcmp(floatabs(floatsub(pos[0], pos[3])), 10.0) != -1 &&
floatcmp(floatabs(floatsub(pos[1], pos[4])), 10.0) != -1 &&
floatcmp(floatabs(floatsub(pos[2], pos[5])), 10.0) != -1) return false;
format(string, sizeof(string), "* You were detained by %s.", GetPlayerNameEx(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You detained %s.", GetPlayerNameEx(giveplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s throws %s in the vehicle.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Detained", 2500, 3);
ClearAnimations(giveplayerid);
TogglePlayerControllable(giveplayerid, false);
PutPlayerInVehicle(giveplayerid, carid, seat);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "That seat isn't available!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "That person isn't cuffed.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not close enough to the player or your car!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Invalid player specified.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " You're not a Cop / FBI / Coastguard!");
}
return 1;
}
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
rymax99 - 17.05.2014
Quote:
Originally Posted by Trynda
OMG IM A DUMB!!! I FORGOT TO PUT THE CODESSSSSSSSSSSSSSSSSSSS OGM OMG
GG
pawn Код:
CMD:detain(playerid, params[]) { if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 5 || PlayerInfo[playerid][pFaction] == 5 && PlayerInfo[playerid][pDivision] == 2) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_GREY, "You can't do this while you're in a vehicle."); return 1; }
new string[128], giveplayerid, seat; if(sscanf(params, "ud", giveplayerid, seat)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /detain [playerid/partofname] [seatid 1-3]");
if(IsPlayerConnected(giveplayerid)) { if(seat < 1 || seat > 3) { SendClientMessage(playerid, COLOR_GRAD1, "The seat ID can't be above 3 or below 1."); return 1; } if(IsACop(giveplayerid)) { SendClientMessage(playerid, COLOR_GREY, "You can't detain other law enforcement officers."); return 1; } if(IsPlayerInAnyVehicle(giveplayerid)) { SendClientMessage(playerid, COLOR_GREY, "That person is in a car - get them out first."); return 1; } if(ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You can't detain yourself!"); return 1; } if(PlayerCuffed[giveplayerid] == 2) { new carid = gLastCar[playerid]; if(IsSeatAvailable(carid, seat)) { new Float:pos[6]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); GetPlayerPos(giveplayerid, pos[3], pos[4], pos[5]); GetVehiclePos(carid, pos[0], pos[1], pos[2]); if(floatcmp(floatabs(floatsub(pos[0], pos[3])), 10.0) != -1 && floatcmp(floatabs(floatsub(pos[1], pos[4])), 10.0) != -1 && floatcmp(floatabs(floatsub(pos[2], pos[5])), 10.0) != -1) return false; format(string, sizeof(string), "* You were detained by %s.", GetPlayerNameEx(playerid)); SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* You detained %s.", GetPlayerNameEx(giveplayerid)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* %s throws %s in the vehicle.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(giveplayerid, "~r~Detained", 2500, 3); ClearAnimations(giveplayerid); TogglePlayerControllable(giveplayerid, false); PutPlayerInVehicle(giveplayerid, carid, seat); } else { SendClientMessage(playerid, COLOR_GREY, "That seat isn't available!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "That person isn't cuffed."); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You're not close enough to the player or your car!"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "Invalid player specified."); return 1; } } else { SendClientMessage(playerid, COLOR_GRAD2, " You're not a Cop / FBI / Coastguard!"); } return 1; }
|
Oh god... My money goes on this being a edit of NG:RP.
Re: HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Trynda - 17.05.2014
Quote:
Originally Posted by rymax99
Oh god... My money goes on this being a edit of NG:RP.
|
LOL this came from my friend :\
Re : HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Ramoboss - 17.05.2014
pawn Код:
PutPlayerInVehicle(giveplayerid, carid, seat);
it's wrong ^^
put this :
pawn Код:
PutPlayerInVehicle(giveplayerid, carid, 3);
Re: Re : HOW TO FIX THIS PLEASE HELP ME :(( [VERY URGENT] [+++REP] -
Trynda - 17.05.2014
Quote:
Originally Posted by Ramoboss
pawn Код:
PutPlayerInVehicle(giveplayerid, carid, seat);
it's wrong ^^
put this :
pawn Код:
PutPlayerInVehicle(giveplayerid, carid, 3);
|
Thanks i will try!!!!
1 Question, Why ",3);" ?? It should be /detain <player> <seatid>