Need help with /detain command
#1

Код:
if (!strcmp(cmd, "/pullincar", true))
			if(IsACop(playerid) || IsAFreecop(playerid))
		{
  tmp = strtok(cmdtext, idx);
  if (!strlen(tmp))
    return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
  new person = strval(tmp);
  tmp = strtok(cmdtext, idx);
  if (!strlen(tmp))
    return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /pullincar [player id] [seatid]");
  new seat = strval(tmp);
  new Float:pos[6];
  GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
  GetPlayerPos(playerid, pos[3], pos[4], pos[5]);
  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;
  PutPlayerInVehicle(person, GetPlayerVehicleID(playerid), seat);
  return 1;
}
Hey guys here is a simple command I have and for some reason it does not pull the person in a car. I am a cop and on duty but it still won't drag the player in any of the 3 seats.

Any help is appreciated
Reply


Messages In This Thread
Need help with /detain command - by Rocky2k12 - 27.03.2013, 00:57
Re: Need help with /detain command - by Rocky2k12 - 27.03.2013, 01:46
Re: Need help with /detain command - by Kar - 27.03.2013, 05:38
Re: Need help with /detain command - by Rocky2k12 - 27.03.2013, 11:38
Re: Need help with /detain command - by Rocky2k12 - 29.03.2013, 20:09
Re: Need help with /detain command - by Nivniv2 - 29.03.2013, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)