27.03.2013, 00:57
Код:
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; }
Any help is appreciated